Batch convert images from the command line

By | January 28, 2009

A simple way to convert images in Linux is by using the command line:

convert image.jpg newImage.gif

will convert the JPG file to a GIF file.

convert -quality 78% file.jpg

will set the quality of the JPEG file to 78%

convert -resize 800×600 file.jpg

will resize the image.
Alternatively, if you wish to use a GUI tool, try Phatch.

5 thoughts on “Batch convert images from the command line

  1. Pingback: CLI image conversions « Linux & Stuff

  2. myyers

    Er, these are some nice, well-known convert (from ImageMagick) commands, but what has it do with *batch* conversion? Where’s the batch? 😉

  3. Pingback: «? ? Ubuntu» » ????? ????? ??????? [2009-6]

  4. Johan H S

    Well it is batch if you just place an asterisk as input file. All the extracted files will have the format as the output filename plus a number. So for example:

    convert -quality 70% * foto.jpg

    will produce a number of fotos:
    foto-0.jpg, foto-1.jpg etc


Leave a Reply

Your email address will not be published. Required fields are marked *