Imagemagick and GD

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
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Imagemagick and GD

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Imagemagick and GD

Post 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
Last edited by fmw42 on 2011-11-14T11:29:27-07:00, edited 1 time in total.
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Imagemagick and GD

Post 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.
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: Imagemagick and GD

Post by agriz »

I have planned to use convert with -geometry
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Imagemagick and GD

Post 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)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply