I am using following code instead of ImageIO.read() as we have older Java
version and it gives dark image as specified in Java bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6372769
). It has been
working fine till now, however recently it started throwing exception for
certain photos -
java.lang.IllegalArgumentException: Invalid ICC Profile Data
When I searched, I found that it is yet another Java bug - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6404011
We **cannot** change the Java version on our server. So I have to figure out
workaround for the following code --
How can I rewrite the code to do what I desire (read an image) by ignoring
this exception??? I tried to enclose the Exception throwing line & loop below that in try-catch block, but for some weird reason, it simply hangs the JVM and I am lost -- how do I fix this? I am not an image expert and hence finding it difficult to decide how to come up with a workaround!!
Any help, pointers would be highly appreciated!!