Page 1 of 1
Imagemagick and GD
Posted: 2011-11-13T12:57:18-07:00
by agriz
Hi
I can see Imagemagick is using huge ram. But it is easier to do.
I just want to know which is best. For some cases, GD is not at all possible.
I have an Image, which will have transparent area (upto 15)
I have to resize and fill 15 different images in those area.
Which is best to handle this? Imagemagick or PHP's GD?
Re: Imagemagick and GD
Posted: 2011-11-13T13:05:49-07:00
by fmw42
GD may be a bit faster. But IM is more flexible and can easily do what you want, if I understand your question. How big are your images? What do you mean by fill transparent areas -- just make them opaque -- if so what color? Can you post a link to an example image? I would expect that if the fill is the same for all the images, then you could do all 15 at one time using mogrify. It is less memory intensive than convert as I understand it. If you need to do this on the web you can call IM command lines from PHP exec() function. See
http://www.rubblewebs.co.uk/index.php
see
http://www.imagemagick.org/Usage/basics/#mogrify
Re: Imagemagick and GD
Posted: 2011-11-13T13:10:02-07:00
by agriz
I am just doing it.
The images are going to be 550x550
There will be 50x50 gap (transparent area). There will be about 15 gaps like that.
I will have 15 different images to fill that gap.
Re: Imagemagick and GD
Posted: 2011-11-13T13:11:22-07:00
by agriz
I have planned to use convert with -geometry
Re: Imagemagick and GD
Posted: 2011-11-13T22:35:30-07:00
by anthony
See Layering images, which is exactly what you are trying to do, position and merge multiple images together.
That is what this whol section is concerned about.
http://www.imagemagick.org/Usage/layers/
Point of clarity. GD was a completely 'minimal' image processing library specifically developed for use in PHP. It provides only a bare minimum of operations and file formats. It was GM or Graphics Magick that was forked off in the IMv5 hey day, basically as an effort to speed up the low level routines (some what successfully). Imagmagick however has advanced far more, and IMv7 (in alpha) is working on those low level speedups, as well as enhancements for handling multi-spectral and multi-masked images (more than 3, 4, or 5 channels)