3

I have a relatively a big jp2 image. the size of this image is about 724 MB. I'm trying to read this image into BufferedImage, but I got this error:

Exception in thread "main" java.lang.IllegalArgumentException: Dimensions (width=95168 height=154832) are too large

Is there any solution to read such big images?

Thanks

didowa
  • 106
  • 9
  • Storing such an Image in memory would require around 58G just for the pixel object references, despite the small compressed size. What do you want to do with such a huge image? Explaining the purpose may help us to suggest a workaround. – RealSkeptic Jan 02 '15 at 12:49
  • 2
    maybe you should read pixel regions of the image as described http://stackoverflow.com/questions/18466513/read-region-from-very-large-image-file-in-java – FrEaKmAn Jan 02 '15 at 12:50
  • I want to read in order to divide it into chunks. Ideally BufferedImage chunks. Then, I want to process each chunks aside (performing convolution for segmentation purposes) – didowa Jan 02 '15 at 12:52
  • Hi, thanks for the reply, but this code found on that link is still generate the same error.. But anyway I will try to get that direction (reading pixels from the image). – didowa Jan 02 '15 at 14:56
  • Can you post some sample code? – felipecrp Jan 10 '15 at 01:51
  • please see this post: http://stackoverflow.com/questions/27744349/read-pixel-from-a-big-jp2-image-without-loading-the-whole-image-into-memory This later is generating this error... – didowa Jan 10 '15 at 14:36

0 Answers0