Page 1 of 1

colorspace won't change

Posted: 2010-05-07T05:41:13-07:00
by sebastien.mengin
Hi,

I have to convert a batch of PDF files from RGB colorspace to Grayscale colorspace.

With the following command line,

Code: Select all

mogrify -compress None -type Grayscale -colorspace gray -density 600 *.pdf
I still see Colorspace: RGB in the output of identify -verbose (whereas Type and Base Type are ok) :

Type: Grayscale
Base type: Grayscale
Colorspace: RGB

Any hint to force Colorspace?

Thanks in advance,
S.

Re: colorspace won't change

Posted: 2010-05-07T05:49:01-07:00
by sebastien.mengin
Sorry, forgot to say, I'm running

Version: ImageMagick 6.5.7-8 2009-11-26 Q16

on ubuntu lucid lynx.

Cheers,
S.

Re: colorspace won't change

Posted: 2010-05-07T12:24:28-07:00
by Drarakel
I think that "RGB" is correct. It always shows "RGB" for type grayscale. (But I hate to say that you can't take 'Type' and 'Base Type' as a clear indicator whether it's really stored as e.g. Grayscale or Truecolor.)

Re: colorspace won't change

Posted: 2010-05-08T07:09:35-07:00
by sebastien.mengin
Thanks for your answer.
What I want is to be sure at 100% that the files processed this way will be ok at the printshop, who prints my books in grayscale.
Any risk that the RIP complains because this "Colorspace: RGB" infos?

Cheers,
S.

Re: colorspace won't change

Posted: 2010-05-08T07:34:18-07:00
by snibgo
I think the "identify -verbose" field "colorspace" refers to the meaning of the three or four colour channels that IM uses, so this will be "RGB", "CMYK", etc.

You should check your files with your printshop. They may be fussy and want CMYK files, even for greyscale.

Re: colorspace won't change

Posted: 2010-05-11T04:35:25-07:00
by sebastien.mengin
snibgo wrote:I think the "identify -verbose" field "colorspace" refers to the meaning of the three or four colour channels that IM uses, so this will be "RGB", "CMYK", etc.

You should check your files with your printshop. They may be fussy and want CMYK files, even for greyscale.
Good idea, thanks for this advice.

Still, the point is that I think there's a mismatch between the -colorspace option for the convert command and the field Colorspace we can see with the identify command.

To my opinion, if I ask

Code: Select all

convert -colorspace Gray
, identify should return

Code: Select all

Colorspace: Grayscale
.

If not, what is the purpose of the Gray keyword proposed in the doc?
http://www.imagemagick.org/script/comma ... colorspace

Thanks again.

Re: colorspace won't change

Posted: 2010-05-11T08:21:42-07:00
by snibgo
Yes, the "colorspace" command and "colorspace" verbose output are two different things. It is confusing. Ideally they would have different names.

"convert in.png -colorspace Gray out.png" will create a greyscale PNG. When that file is read by "identify -verbose out.png", IM will create 3 channels, which will be RGB.

Re: colorspace won't change

Posted: 2011-10-27T12:54:11-07:00
by codymparnell
convert original.jpg -colorspace Gray new-new.jpg

The above command works great for me as long as I have cd'd into the dir I want to make the conversions in

Re: colorspace won't change

Posted: 2011-10-27T13:32:10-07:00
by fmw42
the important information from the verbose info is the TYPE. As long as type=grayscale even if colorspace is RGB, you should be fine, as I understand it. Though I could be wrong.

Re: colorspace won't change

Posted: 2011-10-27T19:43:37-07:00
by anthony
sebastien.mengin wrote:With the following command line,

Code: Select all

mogrify -compress None -type Grayscale -colorspace gray -density 600 *.pdf
WARNING: IM should not generally be used to convert PDF to PDF as these are vector images!!!

A word about Vector Image formats
http://www.imagemagick.org/Usage/formats/#vector