הנה תיקון קטן לתמונות למעלה
ניסיתי מה שאמרת שזה יקטין אחרי שהדבקתי וזה נראה ככה
אתה רואה, זה ממש קטן זה לא טוב, איך אני מגדיל את זה :\
זה הקוד
קוד:
function createthumb($name,$filename,$new_w,$new_h) {
$system=explode('.',$name);
if (preg_match('/jpg|jpeg/',$system[1]))
$src_img=imagecreatefromjpeg($name);
if (preg_match('/png/',$system[1]))
$src_img=imagecreatefrompng($name);
$stamp = imagecreatefrompng('images/stamp.png');
$marge_right = 0;
$marge_bottom = 2;
imagecopy($src_img, $stamp, ((imagesx($src_img)*$marge_right)/100), ((imagesy($src_img)*$marge_bottom)/100), 0, 0, imageSX($stamp),imageSY($stamp));
$old_x = imageSX($src_img);
$old_y = imageSY($src_img);
if ($old_x > $old_y) {
$thumb_w=$new_w;
$thumb_h=$new_h;
}
if ($old_x < $old_y) {
$thumb_w=$old_x*($new_w/$old_y);
$thumb_h=$new_h;
}
if ($old_x == $old_y) {
$thumb_w=$new_w;
$thumb_h=$new_h;
}
$dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);
imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);
if (preg_match("/png/",$system[1]))
imagepng($dst_img,$filename);
else
imagejpeg($dst_img,$filename);
imagedestroy($dst_img);
imagedestroy($src_img);
}