Hey there im getting an error when uploading a pic
here are the part that i get error on
Code:
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg: JPEG library reports unrecoverable error: in /home/waplive/public_html/chat/beauty_contest.php on line 40 Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'http://chat.waplive.co.za/gallery/124390705_emoticon-anime-031.gif' is not a valid JPEG file in /home/waplive/public_html/chat/beauty_contest.php on line 40 Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/waplive/public_html/chat/
Code:
// Creating the Canvas $newImg= imagecreatetruecolor($width, $height); $source = imagecreatefromjpeg($image); // Resizing our image to fit the canvas imagecopyresampled($newImg, $source, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Outputs a jpg image, you could change this to gif or png if needed $res = imagejpeg($newImg, $target, $quality); imagedestroy($newImg);
Comment