I need to load a very big image on AS3 (currently sized at 8192x8192). I am aware that it does not fit any of the limits imposed by Flash regarding drawing to screen or creating a BitmapData of that size. I just want to load the image so I can copyPixels() some parts of it here and there.
The thing is, I'm loading the .jpg file of that size with no problems. The size is recognized correctly from my Loader object. I load it like this:
mImageLoader = new Loader();
var anImageURLRequest:URLRequest = new URLRequest("8192x8192.jpg");
mImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
mImageLoader.load(anImageURLRequest);
Then, on the onComplete method, I try to do this:
Bitmap(mImageLoader.content).bitmapData.getPixel(1000, 1000);
But I am greeted with the #2015 "Invalid BitmapData" error usually reserved for BitmapDatas that are too big. The error also happens if I try to do a copyPixels(), which is what I need to do.
Is there any workaround I can use so I can get data from an image this big on AS3?