Hawkee commented on a Page, Image Thumbnails  -  May 14, 2006

Here are some changes I made to support GIF transparencies. I also changed the imagecopyresized function to imagecopyresampled because the quality of the shrunk images was fairly poor. This fixed it right up.

// Create new image

if($function == \'ImageCreateFromGif\')
{
$colorTransparent = imagecolortransparent($source_img);
$new_img = imagecreate($neww,$newh);
imagepalettecopy($new_img,$source_img);
imagefill($new_img,0,0,$colorTransparent);
imagecolortransparent($new_img, $colorTransparent);
}
else
{
$new_img = imagecreatetruecolor($neww,$newh);
}

// Copy and resize image
imagecopyresampled($new_img,$source_img,0,0,0,0,$neww,$newh,$size[0],$size[1]);

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.