Page 1 of 1

Batch convert jpeg to tiff

Posted: 2017-09-07T03:37:12-07:00
by JohnHeff
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'

Re: Batch convert jpeg to tiff

Posted: 2017-09-07T10:51:50-07:00
by fmw42
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

Code: Select all

magick mogrify -format tif -path path2/test2 -define tiff:tile-geometry=256x256 -compress jpeg *.jpg
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

Re: Batch convert jpeg to tiff

Posted: 2017-09-24T09:50:08-07:00
by JohnHeff
Thank you for your reply.
it worked perfectly.

Regarsd

John