resize big image (12000 px)

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
gabriel

resize big image (12000 px)

Post by gabriel »

I have a JPG image: 30M, 1200x10000 px. If I try to resize to 200x200 px the convert will crash. I tested on suse and fedora core 6. On freebsd it works perfect. Also I have seen the convert make a file in /tmp of 999M.
Any idea?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Add a size hint when resizing JPG images, for example:
  • convert -size 200x200 huge.jpg -resize 200x200 small.jpg
gabriel

Post by gabriel »

Yes , it works but only for JPG format. If I try to resize a huge BMP image the convert crash.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You need to set MAGICK_TMPDIR to a path with lots of free space such as
  • export MAGICK_TMPDIR=/data
    convert huge.bmp -resize 200x200 huge.bmp
You can also use the light-weight stream program to convert the image to a raw format and then convert the smaller more managable raw format to your desired format.
Post Reply