Multipage TIF output file number format

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
paradd
Posts: 2
Joined: 2015-02-13T00:44:19-07:00
Authentication code: 6789

Multipage TIF output file number format

Post by paradd »

I convert multipage TIFF to PNG and take result:
abc.tif -> abc-0.png , abc-1.png, abc-10.png
If convert this PNG files to multipage TIF then pages 0,1,10,11,12...2,20,...
How make ouput filenames like abc-00.png, abc-01.png...etc.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Multipage TIF output file number format

Post by snibgo »

Be explicit how you want the filenames, for example:

Code: Select all

convert abc.tif abc_%06d.png
This creates files abc_000000.png, abc_000001.png, abc_000002.png etc. These will sort in alphabetical order.
snibgo's IM pages: im.snibgo.com
paradd
Posts: 2
Joined: 2015-02-13T00:44:19-07:00
Authentication code: 6789

Re: Multipage TIF output file number format

Post by paradd »

Tnx! %02d works as i wanted.
Post Reply