Page 1 of 1

Convert multi-page TIFF in pieces to avoid memory problems

Posted: 2010-11-30T13:11:48-07:00
by fommil
Dear all,

I have a really big (3GB) multi-page TIFF that I would like to break into smaller pieces. I can successfully accomplish this, for smaller files, using a command such as `convert original.tif output%d.tif`, but I am getting various memory errors (e.g. "malloc: *** mmap(size=1048576) failed (error code=12)", "UnableToAcquireString `Cannot allocate memory' @ string.c/AcquireString/126") when I try it on my big file. Is there any way to do the splitting in pieces, so that the whole file is not mmapped?

Re: Convert multi-page TIFF in pieces to avoid memory proble

Posted: 2010-11-30T13:28:13-07:00
by GreenKoopa
I don't have a specific solution, but see if -limit helps.

Re: Convert multi-page TIFF in pieces to avoid memory proble

Posted: 2010-11-30T13:56:28-07:00
by magick
Add -limit area 0 to your command line. You can also convert one page at a time:
  • convert 'image.tif[0]' image-0.jpg
    convert 'image.tif[1]' image-1.jpg
    ...