ICOEncoder throws array out of bounds exception for some images
Brought to you by:
ianmdev
I get ArrayIndexOutOfBoundsException while converting PNG file to ICO. Here is the stack trace.
java.lang.ArrayIndexOutOfBoundsException: 12
at net.sf.image4j.codec.ico.ICOEncoder.writeAndBitmap(ICOEncoder.java:352)
at net.sf.image4j.codec.ico.ICOEncoder.write(ICOEncoder.java:219)
at net.sf.image4j.codec.ico.ICOEncoder.write(ICOEncoder.java:120)
at net.sf.image4j.codec.ico.ICOEncoder.write(ICOEncoder.java:106)
at net.sf.image4j.codec.ico.ICOEncoder.write(ICOEncoder.java:41)
Attached is the image in question. Thanks