I enjoy using ImageMagick… most of it has been via PHP CLI, however here we have a short example in Bash:
#!/bin/bash for file in `ls -d *.png` ; do convert -crop 1280X985+0+24 $file $(basename $file .png).jpg; done
Basically this does the following:
- Makes a listing of all .png files in the current directory
- Runs the “convert” command (part of ImageMagick) on each .png file in that listing
- Crops the image specified by the geometry arguments
- Saves each image as a .jpg