Hi,
Could someone help provide me the command to achieve the following in one script:
Resize images to a maximum of 1,000px in width (therefore keeping aspect ratio)
Resize images to a maximum of 1,000px in height (therefore keeping aspect ratio)
Convert from PNG to JPG
Look in all subdirectories
I basically have 3,500 images, 70% in PNG and 30% in JPG, and I want them to be a maximum of 1,000px either height or width, and they are to replace originals.
The command I've got so far is:
convert -size 1000x1000, but I don't know how to do the rest.
Thanks a lot.
Reduces all images in many sub directories
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Reduces all images in many sub directories
What version of IM, on what platform?
This reads one png file, resizes so the maximum dimension is 1000 pixels, and writes it as a jpg. It doesn't remove the png.
For the rest, I would use a script. Mogrify will do all the files in a single directory, but you need a script to process multiple directories.
Code: Select all
magick in.png -size 1000x1000 out.jpg
For the rest, I would use a script. Mogrify will do all the files in a single directory, but you need a script to process multiple directories.
snibgo's IM pages: im.snibgo.com