0
votes

My Flex application has an "insert image" feature which uses flash.display.Loader to read an image from a ByteArray like so:

loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.loadBytes(fileRef.data);

This works fine except when a very large image is selected, in which case neither the COMPLETE nor IO_ERROR event handlers are called and no exception is thrown.

The only reference to a size limit I can find is in the BitmatpData documentation (I'm on Flash Player 14):

Starting with AIR 3 and Flash player 11, the size limits for a BitmapData object have been removed. The maximum size of a bitmap is now dependent on the operating system.

My problem is that I have no idea how to detect when a user selects a file that's too large in order to notify them. Right now the application just does nothing which can be pretty confusing.

1

1 Answers

0
votes

I work 24/7 with Images & Image booklets of around say 2 to 6 MB for Artists, Photographers etc. yet I'm at a loss thinking were you would have the requirements for such on the net? and really if so then I;m sure there is another option - yet with the info given just not enough! regards aktell