Powered by Blogger.

Command Line Bulk Converting Images from One Format to Another


First, install ImageMagick:
sudo apt-get install imagemagick
1. Try converting just one image at first: to ensure that it works
convert image.jpg image.png
2. Now convert all:(jpg to png)
mogrify -format png *.jpg
3. Resize
mogrify -resize 50% sharpfinal.png
4. Save as a jpg and output to the directory ‘new_folder’:
mogrify    -format jpg -path ./new_folder  *.png
5. Save as a jpg, output to ‘new_folder’, resize to 50%:
mogrify    -format jpg -resize 50% -path ./new_folder  *.png

No comments