NYCPHP Meetup

NYPHP.org

[nycphp-talk] inconsistency using "imagegif()": is there a workaround?

Phillip Powell phillip.powell at adnet-sys.com
Fri May 7 18:26:21 EDT 2004


re: http://us4.php.net/manual/en/function.imagegif.php

I have one class method that resizes images, including GIF images, and 
works just fine doing so, even up to this line:

[PHP]
eval('image' . $extArray[$type] . '($newImage, "$tmpImageDownloadDir/" . 
$this->fileName);');         // SAVE TO TEMPORARY IMAGE DIR FOR DOWNLOAD
[/PHP]

(yes even with.. EVAL!)

However, in another class method, THIS line produces the following error:

[Quote]
Fatal error: Call to undefined function: imagegif() in 
/www/html/mu-spin/image_catalog/include/classes.inc.php(2262) : eval()'d 
code on line 1
[/Quote]

The line:

[PHP]
eval('image' . $extArray[$type] . '($newImage, 
"$this->thumbLocationPath/$this->fileName", $thumbDimensionInt);');
[/PHP]

I've taken out the reference to $thumbDimensionInt, to no avail.  Same 
exact error every time, but ONLY for GIF images.

But why is it the nearly-identical line in one class method resizes GIF 
images, but the near very same line in another class method (creates 
thumbnails) bombs for GIF images?

Both work just fine for all other images (i.e., JPG, TIFF, PNG, SWF, 
BMP, etc.)

Thanx
Phil

-- 
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
ADNET Systems., Inc.
11260 Roger Bacon Drive Suite 403
Reston, VA  20191
#: (703) 709-7218 x107 
Fax: (703) 709-7219

	




More information about the talk mailing list