index all rss twitter github linkedin email

Álvaro Ramírez

13 September 2015 Use ImageMagick to batch-resize images

Using percentage:

$ mogrify -resize 10% *.png

Using dimensions:

$ mogrify -resize 120x120 *.png

Lots of other alternatives from ImageMagick's documentation:

-resize scale%
-resize scale-x%xscale-y%
-resize width
-resize xheight
-resize widthxheight
-resize widthxheight^
-resize widthxheight!
-resize widthxheight>
-resize widthxheight<
-resize area@

Fix image aspect ratios for Instagram:

$ mogrify -resize 1080x1350 -gravity center -extent 1080 *.jpg