|
Posted by scottkovach on 04/20/05 00:32
This should work for you:
$image_dimensions = @getimagesize($uploadedfilename);
$src_image = @imagecreatefromgif($uploadedfilename);
$resized_image = @imagecreatetruecolor($width,$height); // can be resized,
or else set these vars to the same as the original
if (($src_image) && ($resized_image)) {
if(
imagecopyresampled($resized_image,$src_image,0,0,0,0,$iw,$ih,$image_dimensions[0],$image_dimensions[1])
){
$filepath = "/path/to/new/image/newimagename.jpg";
$jpg_quality = 80;
imagejpeg($resized_image, $filepath, $jpg_quality);
}
}
"Roman Duriancik" <rduriancik@indprop.gov.sk> wrote in message
news:4264EE4B.8070207@indprop.gov.sk...
> Hello,
> Is it possible to convert pictures in gif format to jpg format in php
> script ?
> Thank you for yours responses.
> Roman
[Back to original message]
|