има ли начин отдолу да има още 20px от картинката и вътре да пише ей това :
<?php
$file = '1169902659.jpg';
$percent = 0.2;
$font = "visitor2.ttf";
$fontsize = 9;
$get_size= ceil(filesize($file));
$size=ceil($get_size / 1024);
$info = getimagesize($file);
if($info[0] < 150){echo"Error: File width is small"; exit;}
$type=str_replace("image/", "", $info[mime]);
$type=strtoupper($type);
if($type=="JPEG" || $type=="JPG"){ $image = ImageCreateFromJPEG($file); }
if($type=="GIF") { $image = ImageCreateFromGIF($file); }
if($type=="PNG") { $image = ImageCreateFromPNG($file); }
if($type=="BMP") { $image = ImageCreatefromWBMP($file); }
$text="$info[0]x$info[1] $size"."kB Type: $type";
header('Content-type: image/jpg');
list($width, $height) = getimagesize($file);
$new_width = 150;
$new_height = $height * $percent;
$image_p = imagecreatetruecolor($new_width+1, $new_height + 20);
$backgroundcolor = imagecolorallocate($image_p,0,0,0);
$background = imagefill($image_p,0,0,$backgroundcolor);
#$image = ImageCreateFromJPEG($file);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
$tcolor = imagecolorallocate($image_p,255,255,255);
$fontwidth = imagettfbbox($fontsize,0,$font,$text);
$g = abs($fontwidth[1]) + abs($fontwidth[2]);
imagettftext($image_p,$fontsize,0,$new_width / 2 - ($g / 2),$new_height + 14,$tcolor,$font,$text);
imagejpeg($image_p, null, 100);
?>
:roll: