473,395 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

GD or ImageMagick

I need to rewrite some image resizing code from perl to php.

Although I'm currently using Image Magick in perl, the function
reference is so different, that I'll completely need to rewrite it. That
gives me the option of using GD.

Are there any pros or cons of one over the other? Is GD more generally
available? It was getting hard to find the perl magick libraries, but
that may have been because of perl's falling usage.

In the future, I'll need to do some things like putting text on a
curve. Is one library more "powerful" or easier to use than the other?

Jeff
Jul 13 '08 #1
6 2602
On Sun, 13 Jul 2008, Jeff wrote:
Date: Sun, 13 Jul 2008 08:14:37 -0400
From: Jeff <jeff@spam_me_not.com>
Newsgroups: comp.lang.php
Subject: GD or ImageMagick

I need to rewrite some image resizing code from perl to php.

Although I'm currently using Image Magick in perl, the function reference
is so different, that I'll completely need to rewrite it. That gives me the
option of using GD.

Are there any pros or cons of one over the other? Is GD more generally
available? It was getting hard to find the perl magick libraries, but that
may have been because of perl's falling usage.

In the future, I'll need to do some things like putting text on a curve. Is
one library more "powerful" or easier to use than the other?

Jeff
IMHO, ImageMagick is more powerful, and at the cost of more overhead but
GD is embedded. Depending upon the platform, and whether you have a
binary of phpMagick you may have to build from source, and ymmnv depending
upon your competence with building PHP extensions from source.

Another factor is your familiarity with the Perl binding to IM. As a C
user of the Wand interface, the PHPMagick binding is pretty straight
forward, but I have no experience with the PerlMagick binding.

In the final analysis, if "putting text on a curve" is the deciding
factor, then make sure both packages can do it, then code it up in both,
and compare the results and the amount of effort to get there. Even
if GD requires more PHP coding to achieve a goal, given the fact that
it is already there may be a big advantage in getting your job done
in a timely manner ...

HTH,
Rob Sciuk
---- Posted via Pronews.com - Premium Corporate Usenet News Provider ----
http://www.pronews.com offers corporate packages that have access to 100,000+ newsgroups
Jul 13 '08 #2
sp**@controlq.com wrote:
On Sun, 13 Jul 2008, Jeff wrote:
>Date: Sun, 13 Jul 2008 08:14:37 -0400
From: Jeff <jeff@spam_me_not.com>
Newsgroups: comp.lang.php
Subject: GD or ImageMagick

I need to rewrite some image resizing code from perl to php.

Although I'm currently using Image Magick in perl, the function
reference is so different, that I'll completely need to rewrite it.
That gives me the option of using GD.

Are there any pros or cons of one over the other? Is GD more generally
available? It was getting hard to find the perl magick libraries, but
that may have been because of perl's falling usage.

In the future, I'll need to do some things like putting text on a
curve. Is one library more "powerful" or easier to use than the other?

Jeff

IMHO, ImageMagick is more powerful, and at the cost of more overhead but
GD is embedded. Depending upon the platform, and whether you have a
binary of phpMagick you may have to build from source, and ymmnv
depending upon your competence with building PHP extensions from source.
I take it then that this won't require a recompile of PHP, but will take
an installation of ImageMagick (which I have) and one of the interfaces.
GD comes with PHP?

I see these two:

http://www.magickwand.org/

and something called Image Processing (IMagick)

http://us2.php.net/imagick

The docs leave something to be desired, particularly for the wand and php.

I take it you've used the wand interface, what about the IMagick? Any
comments on which to use?

>
Another factor is your familiarity with the Perl binding to IM. As a C
user of the Wand interface, the PHPMagick binding is pretty straight
forward, but I have no experience with the PerlMagick binding.

In the final analysis, if "putting text on a curve" is the deciding
factor, then make sure both packages can do it, then code it up in both,
and compare the results and the amount of effort to get there. Even
if GD requires more PHP coding to achieve a goal, given the fact that
it is already there may be a big advantage in getting your job done
in a timely manner ...
Well that makes a lot of sense!

Fortunately I have a server on RackSpace and this sounds like
something they should be able to do without much trouble. I've had to
talk a web host through installing the Perl Magick source and that was
no fun for either of us.

Jeff

>
HTH,
Rob Sciuk
---- Posted via Pronews.com - Premium Corporate Usenet News
Provider ----
http://www.pronews.com offers corporate packages that have access to
100,000+ newsgroups
Jul 13 '08 #3
On Jul 13, 7:14*am, Jeff <jeff@spam_me_not.comwrote:
* *I need to rewrite some image resizing code from perl to php.

* *Although I'm currently using Image Magick in perl, the function
reference is so different, that I'll completely need to rewrite it. That
gives me the option of using GD.

* Are there any pros or cons of one over the other? Is GD more generally
available? It was getting hard to find the perl magick libraries, but
that may have been because of perl's falling usage.

* *In the future, I'll need to do some things like putting text on a
curve. Is one library more "powerful" or easier to use than the other?
Many recent php installs have gd built in. To find out if your server
does, you only need to write a php file containing only phpinfo()
between the open and close of php and put this file up on your web
site. When you click on the url for it, you will get a dump of much
more information about the php on your server than you likely ever
wanted to know. If you go well down the page you get, you likely will
find a table called gd. Unless you have ancient php you likely will
find that gd is bundled with the php and you will see what support is
included. In that case you are ready to go with gd. See
http://www.cwdjr.net/php/test/serverinfo.php for an example on the
server I am using. Although I now have php 5 support as you will see,
even an older server with php4 I used until recently had gd built into
the php. I believe bundled gd support came somewhere in the mid series
of php 4.

GD really is not very difficult to use, if you are used to php. Many
recent php books have a chapter on graphics using gd.

Jul 14 '08 #4
cwdjrxyz wrote:
On Jul 13, 7:14 am, Jeff <jeff@spam_me_not.comwrote:
> I need to rewrite some image resizing code from perl to php.

Although I'm currently using Image Magick in perl, the function
reference is so different, that I'll completely need to rewrite it. That
gives me the option of using GD.

Are there any pros or cons of one over the other? Is GD more generally
available? It was getting hard to find the perl magick libraries, but
that may have been because of perl's falling usage.

In the future, I'll need to do some things like putting text on a
curve. Is one library more "powerful" or easier to use than the other?

Many recent php installs have gd built in. To find out if your server
does, you only need to write a php file containing only phpinfo()
between the open and close of php and put this file up on your web
site. When you click on the url for it, you will get a dump of much
more information about the php on your server than you likely ever
wanted to know. If you go well down the page you get, you likely will
find a table called gd. Unless you have ancient php you likely will
find that gd is bundled with the php and you will see what support is
included. In that case you are ready to go with gd. See
http://www.cwdjr.net/php/test/serverinfo.php for an example on the
server I am using. Although I now have php 5 support as you will see,
even an older server with php4 I used until recently had gd built into
the php. I believe bundled gd support came somewhere in the mid series
of php 4.

GD really is not very difficult to use, if you are used to php. Many
recent php books have a chapter on graphics using gd.
I tried to get Imagick, but time after time the install script would
fail, I'd download more crap, and get a it further.. and i ended up
looking for an alternative that wasn't so overblown. Gd just worked.
Cant say anything about the functionality. I just wanted to spit out
postcript, that's all. And resize some images. GD plenty good enugh for
that.

Jul 14 '08 #5

On Sun, 13 Jul 2008, Jeff wrote:
>IMHO, ImageMagick is more powerful, and at the cost of more overhead but GD
is embedded. Depending upon the platform, and whether you have a binary of
phpMagick you may have to build from source, and ymmnv depending upon your
competence with building PHP extensions from source.

I take it then that this won't require a recompile of PHP, but will take an
installation of ImageMagick (which I have) and one of the interfaces. GD
comes with PHP?
PHPMagick is not a trivial build, whereas phpinfo() may report that gd is
already available. (see below).
>
I see these two:

http://www.magickwand.org/

and something called Image Processing (IMagick)

http://us2.php.net/imagick

The docs leave something to be desired, particularly for the wand and php.

I take it you've used the wand interface, what about the IMagick? Any
comments on which to use?
Of course I've used the Im command tools, they are indispensible
for generating gradients for web backdrops etc.

I've also used the Magick Wand (from C), tclMagick (from tcl
obviously), and I'm in the process of building phpMagick
(I had a look at the docs and they seem similar to above).
-- I started compiling phpMagick last week, but the apache server
choked on the module, and I got pulled away by more pressing
projects, so I had to reverse the changes rather than repair them
... I'll probably get back to it by week's end ...

Having said that, gd is *IN* php 5.2.5, and that seems pretty
stable. So for the current project, I'll use gd, with an eye
to testing phpMagick down the road ... I'm beginning to really
like ImageMagick and its bindings ... 8-)

[...]
>
Well that makes a lot of sense!

Fortunately I have a server on RackSpace and this sounds like something
they should be able to do without much trouble. I've had to talk a web host
through installing the Perl Magick source and that was no fun for either of
us.

Jeff
As someone indicated in a separate response, simply loading a .php script
containing <?php phpinfo() ?should tell you if you have gd embedded.
That should get you going ...

Cheers,
Rob Sciuk
---- Posted via Pronews.com - Premium Corporate Usenet News Provider ----
http://www.pronews.com offers corporate packages that have access to 100,000+ newsgroups
Jul 14 '08 #6
Jeff wrote:
I need to rewrite some image resizing code from perl to php.

Although I'm currently using Image Magick in perl, the function
reference is so different, that I'll completely need to rewrite it. That
gives me the option of using GD.

Are there any pros or cons of one over the other? Is GD more generally
available? It was getting hard to find the perl magick libraries, but
that may have been because of perl's falling usage.

In the future, I'll need to do some things like putting text on a
curve. Is one library more "powerful" or easier to use than the other?

Jeff
Jeff,

As others have indicated, Image Magick isn't easy to install, and not
every hosting company will have it installed. But it is more powerful
and flexible than GD (which most hosts will have installed).

The main question is - can you do it easily in GD, with sufficient
speed? If so, I'd go that route. If not, then you'll have to install
Image Magick.

I've found occasionally I need Image Magick for some specialized
processing - but most of the time what I need to do can be done in GD.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 14 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Randell D. | last post by:
Folks, I've not used ImageMagick before - I've worked with the gd functions that are pre-compiled in PHP and found some of the limits problematic yet heard better reviews on ImageMagick. I've...
3
by: Joe | last post by:
Hey I have tried to install ImageMagick on my server, but my apache stalls when i try to start it with the following line added to my php.ini file: extension=php_imagick.dll I can't even...
5
by: nawfer | last post by:
for to resize and copy original photos into a new directory and to use for a thumbnail gallery on the web; what is better: GD, Netpbm or imagemagick and why? very thank
1
by: shanergb | last post by:
Hi all. I'm creating a web-based application that uses PHP, MySQL & Apache on a Windows platform. What I need to do is create images on the fly with either GD or ImageMagick, display them on the...
3
by: Chuck Anderson | last post by:
I am trying to use ImageMagick from a Php script running under Windows XP. I have installed the latest version of ImageMagick - 6.2.1-7 and even tried backing up to version 5.5.7 (based on a...
5
by: Jim Red | last post by:
Hello Can someone give me an example how to use the Imagemagick - Identity command? Cheers Jim
6
by: eholz1 | last post by:
Hello Users, I am not sure if this is the place to post an imagemagick question - please advise. I have imagemagick 6.3 installed, runs from command line ok, etc. I have tried (several times...
2
by: azrael | last post by:
Hy did anyone manage to work with imahemagick through python. I've been googling like a crazy for some instalation instructions, but i cant find anything. please help. thnx
3
by: femtox77 | last post by:
Hi to all!!! I'm trying to convert a pdf file into an image, for example JPG or PNG format, with ImageMagick. I use the command line. For example: convert header.pdf header.jpg. But I obtain a...
0
by: empiresolutions | last post by:
I am working with a TIF to JPG conversion that will result in the JPG being printed from a web page. My issue is the final JPG image prints VERY blurry. The TIF file that has the following...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.