Command line order

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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

ImageMagick resource usage is dependant on the area of the image so with less area you would expect faster processing time. If you want to rotate an image 90 degrees and resize it to 50% it would make sense to first resize the image then rotate it.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Which is why I started with this topic in the first tutorial page :-)

Processing order, and how IM basically teats and handles images, or techniqally 'a ordered image sequence' :-)

I should complete that section with Image Attributes (meta data that is attached to images, and how IM can modify this data) at some point too.

Basics is a must for anyone new to IM, not just old users.

The next section on file handling is also important, though their is a trial of
a new 'read' option which I have been slack and have not added as yet.

EG: image_file'[200x200]'
will read and immedaitely resize the incomming image, before it is added to the end of the current image sequence.

Note that the format is different to '[1]' or '[1-4]' which denotes the frame number from a multi-image file.

Hmmm I'll just update the Reading Images page... I recomend everyone takes a look to fully understand the posibilities...
http://www.cit.gu.edu.au/~anthony/graph ... iles/#read
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
ridera

Post by ridera »

I'd like to resize then filter and unsharp and finally write the file

But, I can't get it to work if the filter and unsharp are between the resize and output file
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

The -comment option is a setting, whereas, -set is an operator. Use this command:
  • convert input.png -strip -set comment "some new comment" output.png
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

The reason for the difference is that -comment is traditionnaly set BEFORE the image is read in and thus you can set it before each image is read, so as only set the comment as the image is read, and only that image.

Code: Select all

convert  -comment one  image_one.png \
            -comment two  image_two.png     output_image_list
The -set option however changes ALL the images that are in memory, including ones previously read in, Thuis to use it you must use parenthesis to read in the image, then set the command then close parenthesis to allw the image to be added to the other images already in memory.

Code: Select all

convert  \( image_one.png set comment one \) \
             \( image_two.png set comment two \)  output_image_list
the same thing goes for other attribute options like -page -dispose -delay -label etc etc etc
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply