creating huge BufferedImage

こ雲淡風輕ζ 提交于 2019-11-28 01:06:57

I believe this is a limitation of the Raster class. Width * Height needs to be less than Integer.MAX_VALUE

http://docs.oracle.com/javase/7/docs/api/java/awt/image/Raster.html

As a work around I'd probably split my BufferedImage into sections where width and height are both less than the square root of Integer.MAX_VALUE, so 46,340x46,340 max.

UPDATE: It looks like the PNGJ Library at http://code.google.com/p/pngj/ was created for this purpose.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!