I'm loading and displaying a large image say 6000 x 6000 px using an image tag. I wanted to take a snapshot of the image. But the maximum limit I get is 2880 px dimensions using Flex 4, flash player 10. Didn't the limit of FP 10 increased to 4096 px? Then why am I getting 2880? Is there a way to increase that size. Or any other method you suggest in doing so?
Thanks.
3 Answers
you can store it in several BitmapDatas and afaik in one ByteArray.

- 4,444
- 3
- 27
- 32
-
Splitting and merging isn't very fruitful though. – Nov 24 '10 at 07:34
ImageSnapshot class uses BitmapData class to create a bitmap image of your screenshot before being converted to PNG or JPEG.
Until flash player 9, BitmapData class was limited to 2880 pixels. But Since flash player 10, the limit is higher (around 8000pixels for height or width).
But the ImageSnapshot wasn't updated.
Here I explain a workaround :
http://weflex.wordpress.com/2013/03/06/imagesnapshot-and-bitmapdata-size-limit/
So far I can go till 4650pixels/

- 303
- 1
- 3
- 9
-
I think with latest version of flash player, this restriction is removed. Not sure, since I do not work much on flash platform these days. – Mar 06 '13 at 11:24
-
Do note the method signature: public static function captureImage(source:*, dpi:Number=0, encoder:IImageEncoder=null, scaleLimited:Boolean=true):ImageSnapshot
So, have you tried: mySnapshot:ImageSnapshot = ImageSnapshot.captureImage(mySource, 200, mx.graphics.codec.JPEGEncoder, false);
Note the last parameter == false, to disable scaleLimited...

- 19,421
- 22
- 81
- 104