Difference between revisions of "ImageMagick"
From Noah.org
Jump to navigationJump to searchLine 10: | Line 10: | ||
convert writes to a different image file. | convert writes to a different image file. | ||
</pre> | </pre> | ||
− | + | Which is true unless you want to convert a group of images. In that case, you use Mogrify instead of Convert. Why? I would call this a bug. If you try this with Convert it will not work (and will, in fact, destroy the last image in your directory). |
Revision as of 18:02, 18 June 2007
Convert all images in a directory from one format to another
This is easy. Use Mogrify, not Convert. The following example converts all PNG files to JPEG:
mogrify -format jpg -quality 85 *.png
I always forget this. Maybe it's because the ImageMagick docs say:
Mogrify overwrites the original image file, whereas, convert writes to a different image file.
Which is true unless you want to convert a group of images. In that case, you use Mogrify instead of Convert. Why? I would call this a bug. If you try this with Convert it will not work (and will, in fact, destroy the last image in your directory).