Hi, all,
My hosting company just upgraded to the new version of GD, and I can't get my image code to work anymore. I tried changing over to ImageCreateTrueColor, but perhaps I don't have something right.
Any suggestions?
Header("Content-type: image/jpeg");
$im_size = getimagesize($img_refer);
$image_width = $im_size[0];
$image_height = $im_size[1];
$im = ImageCreateTrueColor(($image_width / 5),($image_height / 5));
$red = imagecolorallocate ($im,255,0,0);
$blue = imagecolorallocate ($im,1,87,139);
$im2 = imagecreatefromjpeg($img_refer);
imagecopyresized($im,$im2,0,0,0,0,128,96,$image_wi
dth,$image_height);
imagedestroy($im2);
if ($strFunc == "sold") {
imagegammacorrect($im,1,6);
imagettftext($im,15,0,40,50,$red,"/path/verdanab.ttf","SOLD");
}
imagerectangle($im, 0, 0, (($image_width / 5) - 1), (($image_height / 5) - 1), $blue);
imagerectangle($im, 1, 1, (($image_width / 5) - 2), (($image_height / 5) - 2), $blue);
imagerectangle($im, 2, 2, (($image_width / 5) - 3), (($image_height / 5) - 3), $blue);
$ret_im = imagejpeg($im, "", 100);
return $ret_im;
Thanks,
Dave