Resizing large image with little memory

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
timmygyu
Posts: 2
Joined: 2013-06-21T16:31:58-07:00
Authentication code: 6789

Resizing large image with little memory

Post by timmygyu »

Hi,

I'm trying to resize a very large image -- approx 1.2 gigapixels -- to a smaller version.

Using this command...

convert C:\bubblechain-ReNew-2-self-gel-1r-MegaHuge.bmp -resize 50% converted-MegaHuge.bmp

...I'm getting this error:

Code: Select all

C:\Program Files\ImageMagick-6.8.6-Q16> convert C:\bubblechain-ReNew-2-self-gel-
1r-MegaHuge.bmp -resize 50% converted-MegaHuge.bmp

convert.exe: Memory allocation failed `C:\bubblechain-ReNew-2-self-gel-1r-MegaHu
ge.bmp' @ error/bmp.c/ReadBMPImage/933.

convert.exe: no images defined `converted-MegaHuge.bmp' @ error/convert.c/Conver
tImageCommand/3106.
I'm using the most recent binary of ImageMagick for windows, ImageMagick-6.8.6-1-Q16-x86-dll.exe. I have xp sp3, with 2gb of memory. I converted a smaller image fine. I tried to follow some of the ideas here -- http://www.imagemagick.org/Usage/files/#massive -- but I think I'm not grokking the syntax correctly...but before I tinker with it more, I'd like to know what would be the best approach.

Any way I can convert this given the limitations of my system? If so, what's the best way?

Cheers,
Tim
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Resizing large image with little memory

Post by snibgo »

It can't fit your file in RAM, so will use disk. Do you have enough free disk?

Code: Select all

convert -define registry:temporary-path=h:\temp -debug cache C:\bubblechain-ReNew-2-self-gel-1r-MegaHuge.bmp -resize 50% converted-MegaHuge.bmp
... where h:\temp (or somewhere else) has at least 11 GB free.
snibgo's IM pages: im.snibgo.com
timmygyu
Posts: 2
Joined: 2013-06-21T16:31:58-07:00
Authentication code: 6789

Re: Resizing large image with little memory

Post by timmygyu »

I'll have to hook in my external drive, but yes, I'll have enough space then.

I'll try it and post results.

Thank you. :)

Cheers,
Tim
Post Reply