开发者

Load image of size greater than 2880 in Bitmap

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 li开发者_开发知识库ne 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.


If makes a difference which FlashPlayer you are targetting:

versions VS maximum bitmapsize

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


http://www.bit-101.com/blog/?p=2067

Try this

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜