ImageMagick conversions

Helpful one-liners and small scripts for batch processing of images.

  • Drop Quality factor of JPEG files

    for imageFile in *.jpg; do convert -quality 25 $imageFile $imageFile; done
  • Resize JPEG files
    for imageFile in *.jpg; do convert -resize 2048x2048 $imageFile $imageFile; done

    Largest dimension will be 2048 pixels

  • Convert PDF to multiple JPEG files:
    convert image.pdf -scene 1 image-%d.jpg

    "scene" specifies where the page numbers will start

Resources
http://www.wizards-toolkit.org/discourse-server/viewtopic.php?f=1&t=18409
http://www.imagemagick.org/Usage/files/

Technology:

Recent Updates

  • 2 years 1 month ago
  • 2 years 1 month ago
  • 2 years 1 month ago
    php 8.x
  • 2 years 1 month ago
    10.6.7
  • 2 years 1 month ago
    Drop Centos 5/6 stuff