开发者

ImageSnapshot for larger images in flex limit on size

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.


you can store it in several BitmapDatas and afaik in one ByteArray.


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/


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜