Difference between revisions of "ImageMagick"
From Noah.org
Jump to navigationJump to search (New page: Category:Engineering == 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: <p...) |
|||
Line 7: | Line 7: | ||
I always forget this. Maybe it's because the ImageMagick docs say: | I always forget this. Maybe it's because the ImageMagick docs say: | ||
<pre> | <pre> | ||
− | Mogrify overwrites the original image file, whereas, convert writes to a different image file. | + | Mogrify overwrites the original image file, whereas, |
+ | convert writes to a different image file. | ||
</pre> | </pre> | ||
Unless you want to convert a group of images. In that case you use Mogrify instead of Convert. If you try this with Convert it will not work (and will, in fact, destroy the last image in your directory). | Unless you want to convert a group of images. In that case you use Mogrify instead of Convert. 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:00, 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.
Unless you want to convert a group of images. In that case you use Mogrify instead of Convert. If you try this with Convert it will not work (and will, in fact, destroy the last image in your directory).