The following code works on Win2K, Apache 1.3.27, PHP 4.3.2

$gif = imagecreatefromgif('image.gif');
$w = imagesx($gif);
$h = imagesy($gif);
$jpg = imagecreate($w, $h);
// or $jpg = imagecreatetruecolor($w, $h); but colors are off
imagecopy($pic, $im, 0, 0, 0, 0, $w, $h);
// or imagecopyresampled($jpg, $gif, 0, 0, 0, 0, $w, $h, $w, $h);
imagejpeg($jpg); // also works with imagepng()
imagedestroy($gif);
imagedestroy($jpg);
exit;

don't have 4.3 on my linux box yet so I haven't tested it there

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

Reply via email to