Page 1 of 1

Creating thumbnails or resizing image efficiently

Posted: 2013-05-07T10:46:25-07:00
by mcoburn
Suppose that I have a large image 256 MB in size. If I wanted to resize the image or create a thumbnail, I would assume that ImageMagick is careful to not read the entire source file into memory.

- What are the size(s) of the buffer(s) that are used internally by ImageMagick?
- Are there any problems compiling or using ImageMagick for ARM devices?
- Is the following a correct way to instruct ImageMagick to create a thumbnail efficiently from a memory usage perspective. I don't mind if the entire thumbnail bytes are stored in memory temporarily?:

I am using mono by the way:

Code: Select all

ImageMagick.WandGenesis();
IntPtr wand = ImageMagick.NewWand();

ImageMagick.ThumbnailImage(wand, (IntPtr)thumbWidth, (IntPtr)thumbHeight);
			
var thumbnailBytes = ImageMagick.GetImageBlob(wand) as byte[];

ImageMagick.DestroyWand(wand);
ImageMagick.WandTerminus();
			
return thumbnailBytes;

Re: Creating thumbnails or resizing image efficiently

Posted: 2013-05-07T11:48:42-07:00
by magick