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

2002-11-12 Thread Marcus Börger
You can use constant GD_BUNDLED which is either undefined, 0
or 1. Defined as means the bundeled gd version is used.

But i just implemented gd_info(). See below. Tell me please what
else do you want do see?

marcus

[marcus@zaphod php4-HEAD]$ php -r 'var_dump(gd_info());
array(10) {
  [GD Version]=
  string(24) bundled (2.0 compatible)
  [FreeType Support]=
  bool(true)
  [FreeType Linkage]=
  string(13) with freetype
  [T1Lib Support]=
  bool(false)
  [GIF Read Support]=
  bool(true)
  [GIF Create Support]=
  bool(false)
  [JPG Support]=
  bool(true)
  [PNG Support]=
  bool(true)
  [WBMP Support]=
  bool(true)
  [XBM Support]=
  bool(false)
}

At 12:10 12.11.2002, Roman Neuhauser wrote:

# [EMAIL PROTECTED] / 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?

--
If you cc me or take the list(s) out completely I'll most likely ignore
your message.  see http://www.eyrie.org./~eagle/faqs/questions.html

--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




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

2002-11-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2002-11-12 12:51:37 +0100:
 On Tue, 12 Nov 2002, Derick Rethans wrote:
 
  On Tue, 12 Nov 2002, Roman Neuhauser wrote:
  
   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.
 
 It's all fixed, see:
 #ifdef HAVE_GD_GIF_READ
 PHP_FE(imagecreatefromgif,  NULL)
 #endif
 
 and:
 #if HAVE_LIBGD20
 PHP_FE(imagecreatetruecolor,NULL)
 PHP_FE(imagetruecolortopalette, NULL)
 
 So what are you referring to exactly?

Uh, 4.2.2, obviously. I missed it in NEWS in HEAD, sorry, and thanks
for fixing it!

-- 
If you cc me or take the list(s) out completely I'll most likely ignore
your message.  see http://www.eyrie.org./~eagle/faqs/questions.html

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php