Warning: imagecreatefromjpeg() : gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 9 extraneous bytes before marker 0xd9 in E:\xampp\htdocs\photo\functions.php on line 22 Warning: imagedestroy() expects parameter 1 to be resource, boolean given in E:\xampp\htdocs\photo\functions.php on line 35 Warning: imagejpeg() expects parameter 1 to be resource, boolean given in E:\xampp\htdocs\photo\functions.php on line 34 Warning: imagecreatefromjpeg() : 'userphotos/corrupted_image_1.jpg' is not a valid JPEG file in E:\xampp\htdocs\photo\functions.php on line 33 Warning: imagecreatefromjpeg() : gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 9 extraneous bytes before marker 0xd9 in E:\xampp\htdocs\photo\functions.php on line 33 Imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height ) Īnd on Every image it reports errors and warning which are $imageTmp = imagecreatefromjpeg ($originalImage) $imageResized = imagecreatetruecolor($new_width, $new_height) $new_height = round($height * (1/$xscale)) $new_width = round($width * (1/$xscale)) $new_height = round($height * (1/$yscale)) $new_width = round($width * (1/$yscale)) Recalculate new size with default ratio List($width, $height) = getimagesize($originalImage) Get the original geometry and calculate scales $srcImg = imagecreatefromgif($originalimg) Īfter that i resize that converted image, whose code isįunction resizeImage($originalImage,$toWidth,$toHeight) $srcImg = imagecreatefrompng($originalimg) $srcImg = imagecreatefromjpeg($originalimg) If (strtolower($filetype) = 'jpg' or strtolower($filetype) = 'jpeg') I am converting any image format to JPEG or JPG. Save image from one format to another with php gd2
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |