Page 1 of 1

JPEG colorspace confusion

Posted: 2017-04-01T09:35:14-07:00
by vmartin
Let's say I have two JPEG images

Code: Select all

$ identify -verbose one.jpg
Image: one.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 3264x2448+0+0
  Resolution: 72x72
  Print size: 45.3333x34
  Units: PixelsPerInch
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8-bit
...
  Profiles:
    Profile-exif: 31420 bytes
...
  Version: ImageMagick 6.6.9-7 2017-03-14 Q16 http://www.imagemagick.org

Code: Select all

$ identify -verbose two.jpg
Image: two.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 320x240+0+0
  Resolution: 72x72
  Print size: 4.44444x3.33333
  Units: PixelsPerInch
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8-bit
...
  Profiles:
    Profile-8bim: 3602 bytes
    Profile-icc: 3144 bytes
      IEC 61966-2.1 Default RGB colour space - sRGB
...
  Version: ImageMagick 6.6.9-7 2017-03-14 Q16 http://www.imagemagick.org
two.jpg has an explicit sRGB profile, so I assume that the data is sRGB encoded.
What about one.jpg? As I understand it, sRGB is the default so its data should also be sRGB encoded, correct?

What has me confused is that colorspace is listed as RGB in both cases.

MV

Re: JPEG colorspace confusion

Posted: 2017-04-01T09:49:55-07:00
by snibgo
What version of IM are you using? I suspect it is quite old, and a more recent version would show "sRGB".

Yes, images without embedded profiles are usually assumed to be encoded as sRGB.

Re: JPEG colorspace confusion

Posted: 2017-04-01T10:09:57-07:00
by vmartin
Thanks for the quick reply.

I am using the default package version from Ubuntu 12.04:

Code: Select all

  Version: ImageMagick 6.6.9-7 2017-03-14 Q16 http://www.imagemagick.org
I see that is indeed quite old. I will upgrade and try again.

MV

Re: JPEG colorspace confusion

Posted: 2017-04-01T11:38:53-07:00
by vmartin
After upgrading to

Code: Select all

Version: ImageMagick 7.0.5-4 Q16 x86_64 2017-04-01 http://www.imagemagick.org
ColorSpace is reported as sRGB as expected

Thanks again
MV