Noodlecode parody of spaghetti code

Batch image resize

To mass resize image files, you need ImageMagick

yum install ImageMagick

To resize:

cd image-folder/
mogrify -resize 800px *.jpg

Note: 800px is the width, it’ll keep the aspect ratio of the image

magic-hat

Imagic

Categories: Notes

Roundtable Plus S2 Ep. 261 » « Deploy Turbogears 2.1 on Fedora

2 Comments

  1. It didn’t work. I have a folder of jpg images (about 400). When I run the command above I get:

    mogrify: invalid argument for option `450px’: -resize @ error/mogrify.c/MogrifyImageCommand/5755.

  2. Ahhhhh.. Got it.

    Use: mogrify -resize 800x *.jpg

    Without the p (800x vs 800px)

    800x represents width while x800 represents height

    I used “mogrify -resize ‘450x>’ *.jpg”

    Any image larger than 450 was resized to 450 ~ while smaller images kept their respective size.

Leave a Reply

Your email address will not be published.

*

Copyright © 2017 Noodlecode