Page 1 of 1

convert -resize x% hangs on some large TIFF files

Posted: 2012-02-14T17:14:07-07:00
by bthj
Resizing large TIFF scans with a command like

convert scan.tif -resize 50% scan.png

seems to hang forever in some cases, like with this file:

http://teikningar.s.greenqloud.com/TIFF ... rdi_58.tif

I've given this a whole day before hitting break.


But resizing the same file with a command like

convert -resize x1200\> scan.tif scan.png

works just fine.


This I've both tried on a Ubuntu Linux machine with 4GB RAM and 40GB free on disk in /tmp with
ImageMagick 6.6.0-4 2011-06-15 Q16

and on OS X Lion with 8GB RAM and several hundred GB free on disk with
ImageMagick 6.7.1-1 2011-07-29 Q16


Is this a bug or is there another way to half the size of images?


/Björn

Re: convert -resize x% hangs on some large TIFF files

Posted: 2012-02-14T17:43:55-07:00
by fmw42
Ran fine for me on IM 6.7.5.6 Q16 Mac OSX Snow Leopard 4GB RAM. Only took 54 s. Perhaps you need to upgrade your IM or perhaps libtiff and/or libpng.


time convert Heidargerdi.tif -resize 50% Heidargerdi2.png
convert: Heidargerdi.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/767.

real 0m53.848s
user 0m56.082s
sys 0m3.925s


LIBTIFF 3.9.5
libpng 1.4.8_0

Re: convert -resize x% hangs on some large TIFF files

Posted: 2012-02-14T17:53:27-07:00
by magick
Converts for us under Fedora:
  • -> time convert Heidargerdi.tif -resize 50% Heidargerdi2.png
    convert: Heidargerdi.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/768.
    23.348u 3.385s 0:14.23 187.7% 0+0k 0+59456io 0pf+0w

Re: convert -resize x% hangs on some large TIFF files

Posted: 2012-02-14T18:17:06-07:00
by bthj
On the Linux machine I have
LIBTIFF 3.9.5-1ubuntu1
libpng12-0 1.2.46-3ubuntu1

ImageMagick and it's dependencies come via the Ubuntu package mananger, and on the Mac I installed IM via Homebrew.

Are you running IM compiled from source on your machine?

Re: convert -resize x% hangs on some large TIFF files

Posted: 2012-02-14T18:27:46-07:00
by fmw42
bthj wrote:
ImageMagick and it's dependencies come via the Ubuntu package mananger, and on the Mac I installed IM via Homebrew.

Are you running IM compiled from source on your machine?

I installed all my delegates from MacPorts and installed IM manually from source.

I don't expect this will help, but have you tried quoting or escaping the %

convert image.tiff -resize "50%" image.gif
or
convert image.tiff -resize 50\% image.gif