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?
Imagemagick and GD
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Imagemagick and GD
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
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.
Re: Imagemagick and GD
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.
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
I have planned to use convert with -geometry
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Imagemagick and GD
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)
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/
https://imagemagick.org/Usage/