Batch convert jpeg to tiff

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
JohnHeff
Posts: 2
Joined: 2017-09-07T03:10:30-07:00
Authentication code: 1151

Batch convert jpeg to tiff

Post 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'
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Batch convert jpeg to tiff

Post 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
JohnHeff
Posts: 2
Joined: 2017-09-07T03:10:30-07:00
Authentication code: 1151

Re: Batch convert jpeg to tiff

Post by JohnHeff »

Thank you for your reply.
it worked perfectly.

Regarsd

John
Post Reply