Re: brain damage in the gd ext [was: Re: [PHP-DEV] GD version available in script ?]

From: Date: Tue, 12 Nov 2002 11:47:58 +0000
Subject: Re: brain damage in the gd ext [was: Re: [PHP-DEV] GD version available in script ?]
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-90849@lists.php.net to get a copy of this message
On Tue, 12 Nov 2002, Roman Neuhauser wrote: > # paj@pearfr.org / 2002-09-05 20:21:15 +0200: > > Hello, > > > > Working on PEAR::Image_Transform, I realize there is no way to check > > the currently used gd version. Beside that, gd2 functions are always > > available (raise warning if wrong gd version), this forces us to make > > a first call the function and call it again : > > > > if(@ImageCreateTrueColor()){ > > $new_img =ImageCreateTrueColor($new_x,$new_y); > > } else { > > $new_img =ImageCreate($new_x,$new_y); > > } > > > > Is it possible to add a constant at build time ? or is there a better > > way to do it ? > > > > thank's in advance, > > Pierre, > > have you received a reply to your post? > > Everyone: the fact that e. g. imagecreatefromgif() exists no matter > what, throwing a warning if you have a wrong GD version is IMNSHO > utterly dumb. The fact that it limits the number of bogus PRs > doesn't justify the breakage it forces into one's code. > > Could someone please fix this? I thought I fixed all of this some months ago already... Will have a look. Derick -- --------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --------------[ if you hold a unix shell to your ear, do you hear the c? ]-

« previous php.dev (#90849) next »