Convert multipage tiff into blocks of 100 pages

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
mundi
Posts: 5
Joined: 2015-05-08T01:25:18-07:00
Authentication code: 6789

Convert multipage tiff into blocks of 100 pages

Post by mundi »

Hello,

I have a big tiff file of over 1000 pages and want to to split it up in single paged tiffs I use the command

Code: Select all

convert blah.tif -compress JPEG blah_page%04d.tif
The problem is that this uses all memory and aborts. What I want to do now is splitting the tif in smaller tifs of
100 pages then split them up in 1 paged tiffs.

My question: is there a command to splitt my tiff in 100 paged tiffs?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert multipage tiff into blocks of 100 pages

Post by fmw42 »

try

Code: Select all

convert blah.tif[0-99] -compress JPEG blah_page%04d.tif
But IM may still need to read the whole tiff file before processing only the first 100. So you may still need to have a large amount of RAM.

But also see
http://www.imagemagick.org/Usage/files/#massive
http://www.imagemagick.org/script/archi ... tera-pixel
viewtopic.php?f=1&t=25729#p112224
and
http://www.imagemagick.org/Usage/basics/#list_ops
mundi
Posts: 5
Joined: 2015-05-08T01:25:18-07:00
Authentication code: 6789

Re: Convert multipage tiff into blocks of 100 pages

Post by mundi »

Yes, your command did it! Thanks!
Post Reply