I would like to batch convert a lot of files from jpeg to tif. the code below works for a single file, I have tried to use the * to apply it to all files but i keep getting errors. I am typing this in the command line on windows 7 imagemagick version 7.0.5-4
convert dosen't seem to work but magick does.
Any help would be greatly appreciated.
Thanks in advance
John
magick filename.jpg -define tiff:tile-geometry=256x256 -compress jpeg 'ptif:filename.tif'
Batch convert jpeg to tiff
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Batch convert jpeg to tiff
There have been changes in IM 7. See http://imagemagick.org/script/porting.php#cli. In IM 7 magick replace convert. Also for things like compare and montage and mogrify, they must be prefaced with magick. If you want to convert all jpg in some directory to tif, then use mogrify in IM 7 as follows.
Assume your images are in directory test1
Create a new directory to hold your images, say test2
See http://www.imagemagick.org/Usage/basics/#mogrify
Please always identify your exact version of IM 7 (currently at 7.0.7.0), since bugs have been fixed. Also see the tiff defines that you can use at http://www.imagemagick.org/script/comma ... php#define
Assume your images are in directory test1
Create a new directory to hold your images, say test2
Code: Select all
magick mogrify -format tif -path path2/test2 -define tiff:tile-geometry=256x256 -compress jpeg *.jpg
Please always identify your exact version of IM 7 (currently at 7.0.7.0), since bugs have been fixed. Also see the tiff defines that you can use at http://www.imagemagick.org/script/comma ... php#define
Re: Batch convert jpeg to tiff
Thank you for your reply.
it worked perfectly.
Regarsd
John
it worked perfectly.
Regarsd
John