JPEG find the Colorspace

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
qwertywin
Posts: 11
Joined: 2010-04-13T08:02:18-07:00
Authentication code: 8675308

JPEG find the Colorspace

Post by qwertywin »

Hi,

I've been running around in circles trying to workout where ImageMagick gets the colorspace of a JPEG from, I know there must be somewhere in the metadata, but I can't for the life of me find it and traversing the IM source is not as easy as I thought it would be :(

any help would be great

I know that when you do an identify -verbose you get a couple of colorspace related info

1) Type: <colorspace>

from Properties:
1) exif:ColorSpace: -1 <-- this is useless unforunately
2) jpeg:colorspace: 1 <-- either this or the previously mentioned "Type" seem to be what im looking for but i can't find the tag it is referreing to.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: JPEG find the Colorspace

Post by snibgo »

It might come from the JPEG SPIFF "Colorspace" tag:

0 = Bi-level
1 = YCbCr, ITU-R BT 709, video
2 = No color space specified
3 = YCbCr, ITU-R BT 601-1, RGB
4 = YCbCr, ITU-R BT 601-1, video
8 = Gray-scale
9 = PhotoYCC
10 = RGB
11 = CMY
12 = CMYK
13 = YCCK
14 = CIELab
snibgo's IM pages: im.snibgo.com
Post Reply