imagemagick
CLICreate, edit, and convert images from the command line.
13 views
Installation
Homebrew
brew install imagemagickLinks
License
ImageMagickAI Agent Notes
Batch convert, resize, and manipulate images
When to use
Image format conversion, resizing, or batch processing
Examples
convert input.png output.jpgconvert *.png -resize 50% thumbnails/
Proven Recipes
Convert PDF to image🟢 94% success
convert -density 150 input.pdf output.png⚠ Common failures (2)
- Blurry/low resolution output → -density option is required; use -density 150 or higher before the input file
- Policy error: not authorized → Edit /etc/ImageMagick-6/policy.xml and change PDF rights from 'none' to 'read|write'
Fallback:
pdftoppm -r 150 input.pdf outputResize image to percentage🟢 99% success
convert input.jpg -resize 50% output.jpgResize image to exact dimensions🟢 98% success
convert input.jpg -resize 800x600! output.jpg⚠ Common failures (1)
- Aspect ratio changed unexpectedly → Use 800x600 without ! to keep aspect ratio, or 800x to fix only width
Batch convert PNG to JPEG🟢 91% success
convert '*.png' -quality 85 'output_%d.jpg'⚠ Common failures (1)
- Only one file converted → Use mogrify instead: mogrify -format jpg -quality 85 *.png
Fallback:
mogrify -format jpg -quality 85 *.png