Merhabalar ben kaydettiğim resimi 1024 x 768 olarak boyutlandırmak istiyorum.Kullandığım kod aşağıda yardımlarınızı bekliyorum.
PHP:
function CreateBigImage($im, $path, $name, $ext, $text, $font, $fontsize, $alpha) {
@list($width, $height) = getimagesize($im);
$img = @imagecreatefromjpeg($im);
$fontsize = $fontsize*2;
$bbox = @imagettfbbox ($fontsize, 0, $font, $text);
$col = @imagecolorallocatealpha($img, 255, 255, 255, $alpha);
@imagettftext($img, $fontsize, 0, $width/2-$bbox[2]/2, $height/2, $col, $font, $text);
$result = @imagejpeg($img, $path."".$name."_".$ext.".jpg", 100);
if (!$result) {
return "Hata: Resim oluşturulamadı.. (".$path." klasorune yazma hakki verilmemis olabilir)";
} else {
@imagedestroy($img);
return 1;
}
}