NYCPHP Meetup

NYPHP.org

[nycphp-talk] Gif -> Png or Jpeg

Rolan Yang rolan at omnistep.com
Fri Jun 25 17:52:16 EDT 2004


Here's a snippet of code from stuff i use. Hope it helps:

$im=@ImageCreateFromjpeg($imgurl))    or      
$im=@ImageCreateFromgif($imgurl);

if ($imgtype=="jpg") {imagejpeg($im,'',85);} else 
{imageTrueColorToPalette($im,1,256);imagepng($im);}

Kshitij Bedi wrote:

>Any Ideas on converting Gif to Png or Jpeg using PHP GD?
>_______________________________________________
>talk mailing list
>talk at lists.nyphp.org
>http://lists.nyphp.org/mailman/listinfo/talk
>
>  
>



More information about the talk mailing list