JPEG colorspace confusion

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
vmartin
Posts: 5
Joined: 2017-04-01T09:21:56-07:00
Authentication code: 1151

JPEG colorspace confusion

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: JPEG colorspace confusion

Post 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.
snibgo's IM pages: im.snibgo.com
vmartin
Posts: 5
Joined: 2017-04-01T09:21:56-07:00
Authentication code: 1151

Re: JPEG colorspace confusion

Post 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
vmartin
Posts: 5
Joined: 2017-04-01T09:21:56-07:00
Authentication code: 1151

Re: JPEG colorspace confusion

Post 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
Post Reply