Page 1 of 1

bug on very large images

Posted: 2013-05-28T14:46:32-07:00
by robuntu
Hi, it's me again, Roland.
I am still working on my large image projekt.

The last bug appears with an cmyk - tiff image with (731 Mbyte).
I have to resize it to 76591x48633 still cmyk tiff (8.7 GB)
with the command

Code: Select all

convert -resize 76591 img1.tif img2.tif
(works fine with smaller resolution, lets say -resize 2000)

The resize prozess takes about 5 minutes using only 4 of my 32 cpu-cores.
The command terminates normal without any messages.

This resized image has the rigth dimensions but contains only the first some% of the picture (the first 1000 - 2000 lines).
When I try to convert it to a small image (just do look at it) with convert -resize 100 img2.tif img3.jpg
I get the following message:
convert: LZWDecode: Wrong length of decoded string: data probably corrupted at scanline 1657. `img2.tif' @ error/tiff.c/TIFFErrors/496.
So I guess it is something with the LZW or the tiff itself.

Greetings
Roland

Re: bug on very large images

Posted: 2013-05-28T16:39:58-07:00
by fmw42
Probably running out of memory. See http://www.imagemagick.org/Usage/files/#massive

Re: bug on very large images

Posted: 2013-05-28T17:05:19-07:00
by magick
Most likely running out of temporary disk space. Set MAGICK_TMPDIR to a filesystem with plenty of free disk space. ImageMagick uses just a few threads when reading / writing to disk, it would utilize all your cores if the conversion was in memory.

Re: bug on very large images

Posted: 2013-05-28T23:49:21-07:00
by robuntu
negative

I have 256GB of Ram, 128 as free Ram, 128 as a Ramdisk, where I store the image,
I watch the mem in a seperate window and it is far away from swapping.
Set MAGICK_TMPDIR to a filesystem with plenty of free disk space.
What happens if I do not set it, Does it use the path I work in? Or is it a preconfigured tmp dir?
In that case I would have to set this to my ramdisk...

Greeting
Roland

Re: bug on very large images

Posted: 2013-05-29T03:27:16-07:00
by magick
Add -debug cache to your command line. It will tell you where ImageMagick the pixel cache resides.