Page 1 of 1

Image Creation

Posted: Mon May 24, 2004 8:53 am
by zaibe
Hello!

i want to creat thumbnail while uploading the picture i'm using a class for that it works fine when i upload a "jpeg" file but it give error when i try to upload a gif file..

Fatal error: Call to undefined function: imagegif()

any body knows y? my gd support is enabled in php.ini...

But i read somewhere tht gif function is no longer working in new versions of gd co'z of some copy rights stuff...

Any one can please help me if any other way to creat thumbnails which can support .gif and jpeg ?

thankx

Posted: Mon May 24, 2004 10:20 am
by AVATAr
AFAIK PHP can't create gif files (patents stuff) it can read but not create. You have to use third party libraries to do that.
Imagemagic?

Posted: Mon May 24, 2004 2:46 pm
by feyd
or you could write your own library... since the standard isn't hard to find... and the patent is supposed to run out this year, last I saw.

Posted: Tue May 25, 2004 10:41 am
by pickle
Or, just make the thumbnail a jpeg regardless of the filetype uploaded.

Posted: Tue May 25, 2004 11:01 am
by launchcode
The GD library you have installed may not have support for GIF creation - the quickest way to find out:

Code: Select all

<?php
	$gd = gd_info();
	if ($gd[5])
	{
		echo "GIF Creation allowed";
	}
?>
If gd_info doesn't work you have a version of PHP less than 4.3.0.

Posted: Tue Sep 07, 2004 9:24 pm
by anjanesh
Finally gif write support avaiable in ver 4 and 5 !
http://www.php.net/manual/en/ref.image.php
Only supported in GD versions older than gd-1.6. Read-only GIF support is available with PHP 4.3.0 and the bundled GD-library. Write support is avaliable since PHP 4.3.9 and PHP 5.0.1.

Posted: Tue Sep 07, 2004 10:35 pm
by feyd
thanks for the news flash :roll: