Resizing all JPGs in a folder and all subdirs

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Neurolysis

Resizing all JPGs in a folder and all subdirs

Post by Neurolysis »

Hi,

I'm trying to use "mogrify -resize -contrast-stretch .3%,99.7% -resize 150x150 -quality 65" on a folder with a load of subdirectories, the top level folder doesn't have anything in, but there are two levels "/%artist%/%album%/" within it. Is there a switch to use mogrify recursively, and if not is there another solution?

Thanks.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Resizing all JPGs in a folder and all subdirs

Post by anthony »

mogrify is not recursive. It does not even know how to read a directory, just the file name you give it.


I suggest you look at 'find' in the Mogrify Alternatives
http://www.imagemagick.org/Usage/basics/#mogrify_not
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Neurolysis

Re: Resizing all JPGs in a folder and all subdirs

Post by Neurolysis »

Sorry, for years I've used BSD but recently found it necessary to move over to Windows. How would I go about doing that in a command prompt? They certainly don't look like they are designed to work in a prompt.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Resizing all JPGs in a folder and all subdirs

Post by fmw42 »

the best information about DOS Batch scripting in IM is at http://www.imagemagick.org/Usage/api/#windows
Post Reply