convert -resize x% hangs on some large TIFF files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
bthj
Posts: 2
Joined: 2012-02-14T16:52:59-07:00
Authentication code: 8675308

convert -resize x% hangs on some large TIFF files

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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
bthj
Posts: 2
Joined: 2012-02-14T16:52:59-07:00
Authentication code: 8675308

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

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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
Post Reply