when i use this function i get a black picture witht he correct size.
<?php
header("Content-type: image/jpeg");
$background = imagecreate (80, 50);
$foreground = imagecreatefromjpeg("serving.jpg");
imagecopyresampled ($background,$foreground, 0, 0, 0, 0, 80, 50, 800, 500);
imagejpeg($background);
imagejpeg($foreground);
?>\