문제

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top