Hello!
So I know how to use the following command to batch convert a folder of images:
mogrify -format jpeg *.png
But what if the folder of images I want to convert also has '.tif' or '.dng' included as well? Is there another option for ' *.png " that will include any file type? tried the following but it just throws a couple errors:
' mogrify -format jp2 *.png *.tif *.dng' ??
-error unable to open image '*tif': Invalid argument @ error/blob.c/OpenBlob/2697
-error unable to open image '*dng': Invalid argument @ error/blob.c/OpenBlob/2697
-no decode delegate for this image format '' @ error/constitute.c/ReadImage/501
Thank You!
using ImageMagick-6.9.1-Q16-HDRI
windows 7 64 bit
use mogrify on folder with multiple image formats?
-
- Posts: 40
- Joined: 2015-07-14T19:18:45-07:00
- Authentication code: 1151
- Location: Chicago, IL
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: use mogrify on folder with multiple image formats?
use * at the end to process all files
but I urge you to save to a different folder using -path option so you do not overwrite your input images in case of error.
This also works for me to just process png and tif
Code: Select all
mogrify -format jp2 *
This also works for me to just process png and tif
Code: Select all
cd /Users/fred/desktop/test1
mogrify -path ../test2 -format jpg '*.png' '*.tif'
-
- Posts: 40
- Joined: 2015-07-14T19:18:45-07:00
- Authentication code: 1151
- Location: Chicago, IL
Re: use mogrify on folder with multiple image formats?
Thank You fmw42! this worked just as I needed it to. The path was something on my list to add so thank you for that information as well.