Re: Image scaling
Bob Friesenhahn <[email protected]> Sat, 20 Aug 2005 10:47:50 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.apis |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 20 Aug 2005, [iso-8859-2] Micha³ Kowalczuk wrote: > Hello, > I have a question - I need to scale large image (e.g. 10000x10000pix) in C. > Its Format is unknown (it may be PNG, GIF, BMP or TIFF). The way I'm doing it > is: > > im_in_gm = BlobToImage(image_info, mem_in, *size, &exception); > im_out_gm = SampleImage(im_in_gm, 150, 150, &exception); > > but it consumes a lot of memory. > > Is there any way to load image to a image buffer 150x150, that has been set up > before loading image to memory to avoid such behaviour? While the SampleImage() algorithm is very simple, there is not currently a way to perform re-sampling while an image is read. This is an interesting idea, but difficult to implement within GraphicsMagick. You might want to take a look at VIPS (http://www.vips.ecs.soton.ac.uk/) since it supports incremental processing of images while they are being transcoded. VIPS is less convenient to use than GraphicsMagick since it is research-oriented software. Bob ====================================== Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/