Precedence

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
elcorazon

Precedence

Post by elcorazon »

What is the order of precedence with commands for convert? If I use the following command:

convert -density 216 filename.pdf -resize 900 -sharpen 2 -resample 72 filename.jpg

is the order resize, sharpen then resample (left to right)?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Precedence

Post by magick »

Options are processed in order left to right. See http://magick.imagemagick.org/script/co ... essing.php for a discussion. about command line processing.
elcorazon

Re: Precedence

Post by elcorazon »

magick wrote:Options are processed in order left to right. See http://magick.imagemagick.org/script/co ... essing.php for a discussion. about command line processing.
Thanks thats what I figured. So in this command line:

convert -density 216 filename.pdf -resize 900 -sharpen 2 -resample 72 filename.jpg

Would I get better results if I put the -resize 900 before the .pdf file? What I am trying to do is end up with the best looking 300 pixel wide jpg that is text, coming from a pdf file.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Precedence

Post by anthony »

You still need to read in the image BEFORE resizing it!!!!


The -density is not a operator, it just saves the value for later use, in this case when reading in the image. the resize is an operator and gets applied immediately after the image is read in.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply