I have a big JPEG image file. It's dimension is 19000*14000 and the file size is about 41M. i'm using AIR 3.3 SDK, but after the load completes I can't see the image on stage. Does anyone know what the cause of this issue is?
Here is my code:
protected function button1_clickHandler(event:MouseEvent):void
{
file = new File();
file.addEventListener(Event.SELECT, imageFileHandler);
file.browseForOpen("image file", [new FileFilter("image file","*.jpg;*.jpeg")]);
}
protected function imageFileHandler(event:Event):void
{
fs = new FileStream();
fs.openAsync(file, FileMode.READ);
fs.addEventListener(Event.COMPLETE, bytesComplete);
}
protected function bytesComplete(event:Event):void
{
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoadHandler);
var bytes:ByteArray = new ByteArray();
fs.readBytes(bytes);
loader.loadBytes(bytes);
fs.close();
}
protected function imageLoadHandler(event:Event):void
{
image.source = (loader.content as Bitmap).bitmapData;
}