PHP קוד:
$filename = "uploads/".$_GET['f'].".".$_GET['ext'];
$picW = $_GET['w'];
$picH = $_GET['h'];
header('Content-type: image/'.$_GET['ext']);
list($width, $height) = getimagesize($filename);
$newwidth = $picW;
$newheight = $picH;
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefrompng($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagepng($thumb);
ImageDestroy($thumb);
זה הקוד שלי, הוא עובד רק שהוא יוצר רקע שחור ל PNG השקוף....
מה עושים?
עריכה: עוד משהו שנזכרתי, יש למישהו מושג איך אני עושה שברגע שילחצו קליק ימני - שמירת תמונה בשם זה ישמור להם ישר את התמונה ולא xx.php??