大小大于2880的位图的加载图像位图、图像、加载、大小

2023-09-08 15:20:30 作者:想跟你鬼混

我使用位图来加载图像,如果图像大小大于2880的H / W,我得到一个错误。

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); 

如果canvasToPrint.width> 2880或canvasToPrint.width> 2880我会得到下面的错误,在1号线 错误:无效的位图

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

要过度过来我已经使用bitmapdataunlimited级以上的问题,正如下面的链接。

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

但它仅适用罚款的高度和宽度为4096像素,引导我如果有另一种解决方案是存在的,创造巨大的位图。

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

推荐答案

如果让你的目标定位这FlashPlayer的一个区别:

If makes a difference which FlashPlayer you are targetting:

版本VS最大bitmapsize

版本的Adobe Flash -9:2880x2880像素    FLASHPLAYER 10:4096×4096像素    版本的Adobe Flash 11:无限

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