Bug #17912 Updated: getting info from gd.so
| From: | rasmus@php.net | Date: | Fri, 21 Jun 2002 20:21:46 +0000 |
| Subject: | Bug #17912 Updated: getting info from gd.so | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11747@lists.php.net to get a copy of this message | ||
ID: 17912
Updated by: rasmus@php.net
Reported By: tit.petric@telemach.net
Status: Bogus
Bug Type: GD related
Operating System: linux debian/mandrake
PHP Version: 4.2.1
New Comment:
Why do you want the version? Isn't it the capabilities you are
interested in? imagetypes() would give you that. The version tells
you next to nothing since every version of GD can be compiled
differently. ie. with or without ttf, png, jpg, gif, etc.
Previous Comments:
------------------------------------------------------------------------
[2002-06-21 16:16:53] tit.petric@telemach.net
hmm in phpinfo() in the gd section the module info says gd 1.6.2 or
higher, and i jumped to conclusion that this is what the module itself
supports (since i have gd1.9.something), and didnt check if there is a
seperate module for gd2 (which i doubt there is, meaning the version
reply should stay the same or am i wrong?)
is there any way to get this number without having to parse/grep
phpinfo(), something like a variable $IMG_* (nothing acctual
system-level listed in there yet)
p.s. congrats on the baby rasmus (a bit late, but better than never :))
------------------------------------------------------------------------
[2002-06-21 15:57:41] rasmus@php.net
phpinfo() does show the GD version. Between versions 1.6 and 1.8 there
was no way to distinguish, so it is approximate, but other versions
should be shown just fine. As for figuring out which image types are
available, use imagetypes()
------------------------------------------------------------------------
[2002-06-21 15:54:39] tit.petric@telemach.net
im having trouble determinating to which version of GD gd.so was linked
to, phpinfo() only shows the acctual version of gd.so, but not the
version of GD it was linked to..
some variable to show the acctual gd version (major and minor) would be
nice, so i and other people would know how to dynamically use image*
functions according to that variable, because setting up each server
with platform-dependant code is a bit time consuming, and coding two
different image libraries or graphing libraries which use GD is also a
waste of time, if just a few functions change their names and
behaviour.
example would be..
if ($GD_VERSION=='1') {
imagecopyresized(...);
} else {
imagecopyresampled(...);
}
be a sweetheart and add that :* (otherwise excelent work)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17912&edit=1