General Community > Chit Chat

graphics modules needed for gif creating

(1/4) > >>

andrea:
Question: Which graphics modules/libraries exactly need to be installed on a webserver in order to create gif images?

Zef Hemel:
Question, are there still free modules availlable that allow to create GIF since it's a patented format (well the patent ended in the US already, not in Europe though).

andrea:
I am also interested in paid modules which allow to create gifs with php or perl.

Zef Hemel:
I assume they really have to be GIFs, PNG or JPEG is not good enough right?

andrea:
For a transparent background I'm afraid they need to be gifs. Right? Its only the gifs which make the problem at all. For example these simple php commands work well on my hosts when creating a png:


--- Code: ---<?
Header("Content-type: image/png");
$text = "hello world";
$image = imagecreate(100,20);
$farbe_body=imagecolorallocate($image,0x2c,0x6D,0xAF);
$font_c = imagecolorallocate($image,255,255,255);
Imagettftext($image, 12, 0, 6, 16, $font_c, "../fonts/comic.ttf", "$text");
Imagepng($image);
ImageDestroy($image);
?>
--- End code ---

However as soon I try to make a gif by changing the code to this:


--- Code: ---<?
Header("Content-type: image/gif");
$text = "hello world";
$image = imagecreate(100,20);
$farbe_body=imagecolorallocate($image,0x2c,0x6D,0xAF);
$font_c = imagecolorallocate($image,255,255,255);
Imagettftext($image, 12, 0, 6, 16, $font_c, "../fonts/comic.ttf", "$text");
Imagegif($image);
ImageDestroy($image);
?>
--- End code ---

I am getting this error:
<br />
<b>Fatal error</b>:  Call to undefined function:  imagegif() in <b>E:\wampp2\htdocs\img-test\hello-world-gif.php</b> on line <b>8</b><br />

Thats why I'm asking what is needed to activate gif creation.

Navigation

[0] Message Index

[#] Next page

Go to full version