Invalid ICC profile:duplicate sequence numbers

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.