on-internet
← Community

imagecreatefromjpeg not working

Stack Overflow ·

Hello i have little problem with image showing after making it object. I'm still learning to use object images. So here is my code: $what = getimagesize($file); switch(strtolower($what['mime'])){ case 'image/png' : $src_id = imagecreatefrompng($file); imagesavealpha($src_id,true) ; break; case 'image/jpeg': $src_id = imagecreatefromjpeg($file); break; case 'image/gif' : $old_id = imagecreatefromgif($file); $src_id = imagecreatetruecolor($what[0],$what[1]); imagecopy($src_id,$old_id,0,0,0,0,$what[0],$what[1]); break; default: die(); } header('Content-Type: image/jpeg'); imagejpeg($scr_id); imag

Comments

Sign in or sign up to comment and upvote.

No comments yet.