Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ImageIO

 
yuki tanabe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm trying to use ImageIO's read(InputStream input)method with setUseCache set to false. I seem to get an error if I try to get a large (>1MB) image using this method.
This is the part of the stack trace I get:
java.lang.IndexOutOfBoundsException: Index: -1, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:508)
at java.util.ArrayList.get(ArrayList.java:320)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(JPEGImag
eReader.java:329)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(JPEGImageReade
r.java:420)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageRead
er.java:536)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageRe
ader.java:869)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.jav
a:853)
at javax.imageio.ImageIO.read(ImageIO.java:1315)
at javax.imageio.ImageIO.read(ImageIO.java:1239)
Is there some limit as to the size of uncached image ImageIO class can handle?
cheers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic