0
votes

I am using bitmap to load the image, if the image size is more than 2880 h/w I am getting an error.

BitmapData src = new BitmapData(canvasToPrint.width,canvasToPrint.height)(canvasToPrint.width, canvasToPrint.height);
src.draw(_designArea);  // -- encode the jpg        
var quality:int = 115; 
var jpg:JPEGEncoder = new JPEGEncoder(quality);                 
var byteArray:ByteArray = jpg.encode(src); 

if canvasToPrint.width > 2880 or canvasToPrint.width > 2880 I will get below error at line 1 Error : invalid Bitmap

To over come the above issue I have used bitmapdataunlimited class, as mentioned in the below link.

http://blog.formatlos.de/2008/05/28/bitmapdataunlimited/comment-page-2/#comment-4870

But it only works fine for 4096 pixel of height and width, guide me if any alternative solution is there to create huge bitmap.

2

2 Answers

2
votes

If makes a difference which FlashPlayer you are targetting:

versions VS maximum bitmapsize

flashplayer -9 : 2880x2880 px
flashplayer 10 : 4096x4096 px
flashplayer 11 : unlimited