ygnhzeus
ygnhzeus

Reputation: 367

RGB accuracy problems with bufferedImage

We find that there always exists some RGB accuracy problems whlie getting RGB from a jpeg file using bufferedImage in Java(ImageIO.read(file))..

Does anyone know some alternatives solutions?

Upvotes: 0

Views: 152

Answers (1)

Miquel
Miquel

Reputation: 15675

What do you mean by accuracy problems? Does the JPEG you save and the one you load with Java look different? How are the colors different?

I'm going to go on a limb here and assume that you are using a JPEG with a color profile, meaning that you are reading RGB values just right but, your original application takes also the color profile and uses it to map the RGB values extracted from your JPEG into the RGB values that get shown on your monitor. Have a look with a good image viewer, and see what the embedded profile in your image is (look for things like sRGB or AdobeRGB) and see if your problems are consistent with the different color profiles

Upvotes: 1

Related Questions