Script: convert image.jpg -fuzz 5% -fill #f1f0ee -opaque white -resize 720x1125 -background #f1f0ee -gravity center -extent 720x1125 output.jpg
Platform: Windows
Imagemagick Version: 6.9.3
How do I loop this script to run on all images in a folder? I want the input and output images to be in separate folders.
Want to loop this script for all files in a folder
-
- Posts: 16
- Joined: 2016-01-11T05:12:11-07:00
- Authentication code: 1151
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Want to loop this script for all files in a folder
See documentation for your script language. Hint: "help for".
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Want to loop this script for all files in a folder
see mogrify at http://www.imagemagick.org/Usage/basics/#mogrify
create a new directory (test2)
cd to your existing image directory (test1)
On unix, quotes are required about hex colors.
create a new directory (test2)
cd to your existing image directory (test1)
Code: Select all
mogrify -path path2/test2 -format jpg -fuzz 5% -fill "#f1f0ee" -opaque white -resize 720x1125 -background "#f1f0ee" -gravity center -extent 720x1125 *