imagemagick

Convert, edit, and transform images from command line

brewmacoslinux
Try with needOr install directly
Source

About

Tools and libraries to manipulate images in select formats

Commands

convertidentifycompositemogrifydisplayanimateimportmontage

Examples

resize image to specific dimensions$ convert input.jpg -resize 800x600 output.jpg
convert image to different format$ convert image.png image.jpg
compress image to reduce file size$ convert input.jpg -quality 85 output.jpg
crop image to specific area$ convert input.jpg -crop 400x300+50+50 output.jpg
get image dimensions and file info$ identify image.jpg