Kenneth Morris Lee
Well-known member
In Photoshop, I saved a JPG image with 3 different embedded ICC profiles: sRGB, P3 and Adobe RGB. I also saved a copy with no ICC profile.
I then sampled the color values of the same pixel in the 4 images, using the Photoshop Eyedropper tool, the PHP function imagecolorat(), and the Java method getRGB().
JPG with embedded sRGB profile
Photoshop RGB: 84,44,18
PHP RGB: 84,44,18
Java RGB: 84,44,18
JPG with No Profile
Photoshop RGB: 84,44,18
PHP RGB: 84,44,18
Java RGB: 83,44,19
JPG with embedded P3 profile
Photoshop RGB: 78,46,23
PHP RGB: 78,46,23
Java RGB: 83,44,17 (same as sRGB/no profile ?)
JPG with embedded Adobe RGB profile
Photoshop RGB: 76,48,27
PHP RGB: 76,48,27
Java RGB: 83,44,19 (same as sRGB/no profile ?)
Changing the embedded profiles adjusts the colors a bit, which is to be expected I presume.
1) The JPG with no profile, has the same values as the JPG with an sRGB profile. What does that tell us ?
2) While Photoshop and PHP seem to take the ICC profile into consideration (and show adjusted colors), the Java sampling method keeps giving us the values which match the images with no profile/sRGB profile.
According to the Java documentation the getRGB() method "Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data. Color conversion takes place if the default model does not match the image ColorModel."
Does that mean that Java is ignoring the embedded profile, or converting the data to sRGB ?
Thanks for your help
I then sampled the color values of the same pixel in the 4 images, using the Photoshop Eyedropper tool, the PHP function imagecolorat(), and the Java method getRGB().
JPG with embedded sRGB profile
Photoshop RGB: 84,44,18
PHP RGB: 84,44,18
Java RGB: 84,44,18
JPG with No Profile
Photoshop RGB: 84,44,18
PHP RGB: 84,44,18
Java RGB: 83,44,19
JPG with embedded P3 profile
Photoshop RGB: 78,46,23
PHP RGB: 78,46,23
Java RGB: 83,44,17 (same as sRGB/no profile ?)
JPG with embedded Adobe RGB profile
Photoshop RGB: 76,48,27
PHP RGB: 76,48,27
Java RGB: 83,44,19 (same as sRGB/no profile ?)
Changing the embedded profiles adjusts the colors a bit, which is to be expected I presume.
1) The JPG with no profile, has the same values as the JPG with an sRGB profile. What does that tell us ?
2) While Photoshop and PHP seem to take the ICC profile into consideration (and show adjusted colors), the Java sampling method keeps giving us the values which match the images with no profile/sRGB profile.
According to the Java documentation the getRGB() method "Returns an array of integer pixels in the default RGB color model (TYPE_INT_ARGB) and default sRGB color space, from a portion of the image data. Color conversion takes place if the default model does not match the image ColorModel."
Does that mean that Java is ignoring the embedded profile, or converting the data to sRGB ?
Thanks for your help
Last edited:

