Handling Picture Times Exception information:
Javax.imageio.IIOException:Invalid ICC profile:duplicate sequence numbers
Report Abnormal Pictures:
Someone on the web encountered the same exception message and used the plugin to solve the problem:
Http://stackoverflow.com/questions/32023809/javax-imageio-iioexception-invalid-icc-profile-duplicate-sequence-numbers
Twelvemonkeys ImageIO website Address
http://haraldk.github.io/TwelveMonkeys/#jpeg
Twelvemonkeys ImageIO is a collection of plugins and extensions for Java ' s ImageIO.
These plugins extends the number of image file formats supported in Java, using the javax.imageio.* package. The main purpose of this project are to provide support for formats not covered by the JRE itself.
The Twelvemonkeys ImageIO Project supports a number of image formats that the JRE itself has not covered.
Problem Solving Solutions
1. Import the appropriate format package into the project, such as a JPEG
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-jpeg</artifactId>
<version>3.0-rc5</version>
</dependency>
Note Version issues
The latest version of plugins requires the use of jdk1.7, such as <version>3.2.1</version>
And our general engineering is still in jdk1.6, so we need to use its earlier version such as <version>3.0-rc5</version>
In fact, you can use the official website to provide the source code using 1.6 version to compile, but the source has problems, eventually gave up.
2. Loading issues
After adding the JPEG package, the Java Project main function ran the problem solved, all normal, but put the Web project Tomcat problem still.
Because the ImageIO plugin registry (the Iioregistry) is "VM global", it doesn ' t by default work well with servlet context S.
The above is the plug-in official website of the story, you need to add the following code to deal with the image of the place.
Imageio.scanforplugins ()
Invalid ICC profile:duplicate sequence numbers