string formats for colorspace reporting wrong value IM 6.9.3.7 Q16 Mac OSX

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

string formats for colorspace reporting wrong value IM 6.9.3.7 Q16 Mac OSX

Post by fmw42 »

.
For the image provided at viewtopic.php?f=24&t=29420#p131733

The following two commands give a colorspace of gray when it should be CMYK. NOTE I modified the filename to avoid spaces below.

Code: Select all

infile="MAR2014_parts_English.pdf"
convert -ping "$infile[0]" -format "%r" info:`
DirectClass Gray

Code: Select all

infile="MAR2014_parts_English.pdf[0]"
convert -ping "$infile[0]" -format "%[colorspace]" info:`
Gray



Whereas, identify -verbose says it is CMYK

Code: Select all

infile="MAR2014_parts_English.pdf[0]"
identify -verbose "$infile"
Image: MAR2014_parts_English.pdf
Format: PDF (Portable Document Format)
Mime type: application/pdf
Class: DirectClass
Geometry: 612x792+0+0
Resolution: 72x72
Print size: 8.5x11
Units: Undefined
Type: ColorSeparation
Base type: ColorSeparation
Endianess: Undefined
Colorspace: CMYK
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: string formats for colorspace reporting wrong value IM 6.9.3.7 Q16 Mac OSX

Post by snibgo »

On that file, "-ping" gives sRGB but if we omit "-ping", we get CMYK.

Interestingly, "-ping" is no faster. Both are about 15 seconds on my laptop.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: string formats for colorspace reporting wrong value IM 6.9.3.7 Q16 Mac OSX

Post by fmw42 »

What version of IM were you using to get sRGB with -ping and CMYK without -ping? And I presume you are on Windows.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: string formats for colorspace reporting wrong value IM 6.9.3.7 Q16 Mac OSX

Post by snibgo »

IM v6.9.2-5 Q16, pre-built binary, on Windows 8.1.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: string formats for colorspace reporting wrong value IM 6.9.3.7 Q16 Mac OSX

Post by magick »

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.
Post Reply