Discussion:
preferred sequence of parameters
John Culleton
2010-09-13 14:30:39 UTC
Permalink
convert in.jpg -colorspace CMYK out.jpg
convert -colorspace CMYK in.jpg out.jpg

Are both correct?

Is one form better in some way than the other?
--
John Culleton
Wexford Press
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
http://www.booklocker.com/books/4055.html
Anthony Thyssen
2010-09-14 02:31:30 UTC
Permalink
On Mon, 13 Sep 2010 10:30:39 -0400
magick-users-***@imagemagick.org wrote:
| convert in.jpg -colorspace CMYK out.jpg
| convert -colorspace CMYK in.jpg out.jpg
|
| Are both correct?
|
| Is one form better in some way than the other?

They can mean different things depending on the input file format.

-colorspace is designed to modify how an image is stored in memory
transforming it from the current 'colorsapce' to the specified
'colorspace'.

If you just want to set the color space and not actually modify the
color values that are stored use "-set colorspace CMYK"


You may also like to look at -type which is ment to specify the
'type of image' that is to be read in and/or saved.

See IM Examples, Basics, Image Color Space Storage
http://www.imagemagick.org/Usage/basics/#colorspace
and the next section Image Type when Reading and Writing
http://www.imagemagick.org/Usage/basics/#type


Anthony Thyssen ( System Programmer ) <***@griffith.edu.au>
--------------------------------------------------------------------------
The more knowledge you know, the less you know, that you know you know.
Knowledge breeds Ignorance.
--------------------------------------------------------------------------
Anthony's Castle http://www.cit.griffith.edu.au/~anthony/
John Culleton
2010-09-15 18:31:46 UTC
Permalink
Post by Anthony Thyssen
On Mon, 13 Sep 2010 10:30:39 -0400
| convert in.jpg -colorspace CMYK out.jpg
| convert -colorspace CMYK in.jpg out.jpg
|
| Are both correct?
|
| Is one form better in some way than the other?
They can mean different things depending on the input file format.
MY question simply dealt with the sequence of parameters. Should
-colorspace CMYK
precede the input file name or should it be between the input and
output file names?
--
John Culleton
Wexford Press
"Create Book Covers with Scribus"
Printable E-book 38 pages $5.95
http://www.booklocker.com/books/4055.html
Fred Weinhaus
2010-09-15 21:21:38 UTC
Permalink
My understanding is that in general for non-vector formats it should
follow the input and for vector formats it should precede the input
(for example when converting a cmyk pdf to rgb image).

However, better results are generally achieved by using profiles,
depending upon your actual goal.

see http://www.imagemagick.org/Usage/formats/#profiles
Post by John Culleton
MY question simply dealt with the sequence of parameters. Should
-colorspace CMYK
precede the input file name or should it be between the input and
output file names?
Anthony Thyssen
2010-09-16 03:14:29 UTC
Permalink
On Wed, 15 Sep 2010 14:21:38 -0700
magick-users-***@imagemagick.org wrote:
| My understanding is that in general for non-vector formats it should
| follow the input and for vector formats it should precede the input
| (for example when converting a cmyk pdf to rgb image).
|
| However, better results are generally achieved by using profiles,
| depending upon your actual goal.
|
| see http://www.imagemagick.org/Usage/formats/#profiles
|

The way you look at it is that things are applied on the command line
in the order they are given. so

read the image
changes its color space
write the image.


Setting that effect how images are read will go before the image read.

Many of these are to do with image generation (like -size) or vertor
image reading (like -density).




Anthony Thyssen ( System Programmer ) <***@griffith.edu.au>
--------------------------------------------------------------------------
That which does not kill us, makes us stronger! -- Nietzchean Principle
What we don't know, can kill us! -- Larry Niven, "BoarderLand of Sol"
--------------------------------------------------------------------------
Anthony's Castle http://www.cit.griffith.edu.au/~anthony/

Loading...