Search code examples
imagemagickimagemagick-convert

How to convert all files (in different formats) in given folder to different file type


I have a folder with many images from different types (png, jpg, jpeg, bmp, pdf), and I would like to convert them all into png (for instance) using imagemagick.

Is there a single command which can perform this? If not, what should I do instead?

Thanks.


Solution

  • Try the mogrify command:

    mogrify -format png *.*
    

    But be careful. Without the -format option, mogrify overwrites the original images. Make sure to read the documentation.