//JPEG function
function thumb_jpeg($image_name, $namn)
{
global $source_path;
global $destination_path;
global $new_width;
global $new_height;
list($width, $height, $type, $attr) = getimagesize($source_path);
$result = $width/$new_width;
$ny_height = $height/$result;
$destimg=ImageCreate($new_width,$ny_height) or die("Problem In Creating image");
$srcimg=ImageCreateFromJPEG($source_path) or die("Problem In opening Source Image");
ImageCopyResized($destimg,$srcimg,0,0,0,0,$new_width,$ny_height,ImageSX($srcimg),ImageSY($srcimg))
or die("Problem In resizing");
Imagejpeg($destimg,$destination_path.$namn) or die("Problem In saving");
}
I have dowloaded this script... But as you see on my file the picture is all yellow, but the original image is a natural photo of me...
Can somebody tell me whats wrong?
Why does the picture gets fucked up?