Page 1 of 1

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

Posted: 2016-04-07T16:23:16-07:00
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

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

Posted: 2016-04-08T10:28:24-07:00
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.

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

Posted: 2016-04-08T10:38:01-07:00
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.

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

Posted: 2016-04-08T10:51:14-07:00
by snibgo
IM v6.9.2-5 Q16, pre-built binary, on Windows 8.1.

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

Posted: 2016-04-08T14:49:16-07:00
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.