I've gone through the online documentation, and read many examples, but I'm obviously missing something rather basic.
How does one process a whole folder of image files (jpgs) while keeping the filenames intact, but putting the resulting files in a new folder? (I'm working in a Windows 10 environment, not Linux or Unix)
For example:
convert *.jpg -quality 75 -resize 1920x1920^> -unsharp 10x4+1+0 C:\Resized\
doesn't work as I had hoped.
nor does:
convert *.jpg -quality 75 -resize 1920x1920^> -unsharp 10x4+1+0 C:\Resized
nor does:
convert *.jpg -quality 75 -resize 1920x1920^> -unsharp 10x4+1+0 C:\Resized\*.jpg
So what am I missing?
Processing whole directories of images
Re: Processing whole directories of images
Uuu-ha You're struggling less with imagemagick than with windows batch scripting !
I'd recommend learning some powershell commands...
http://www.computerperformance.co.uk/powershell/
another hint is mogrify, which is meant for batch processing (without writing the loops yourself). But in the end I always returned to my own looping, because mogrify is limited (or more complicated) in terms of input patterns and so on.
I'd recommend learning some powershell commands...
http://www.computerperformance.co.uk/powershell/
another hint is mogrify, which is meant for batch processing (without writing the loops yourself). But in the end I always returned to my own looping, because mogrify is limited (or more complicated) in terms of input patterns and so on.
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Processing whole directories of images
As olidem mentioned, the mogrify tool is probably better suited for this job. Try a command like this...
Code: Select all
mogrify -resize 1920x1920^> -unsharp 10x4+1+0 -quality 75 -path "C:\Resized" *.jpg
There are some more complicated tasks that can't be done with "mogrify", so running "convert" in a simple "for" loop is the best approach. If your actual command is as simple as your example, "mogrify" should do what you need very well.
Re: Processing whole directories of images
Thank you, GeeMack!!! That's exactly what I was looking for/missing!