0, 0, 0, 0, 150, 150, 150, 150I have an image error when i try to generate a jpeg image but php doesn't retrieve me any errors
config->item('imgrack_apath')."/avatares/".$UsuarioId.".".$this->config->item('img_config_avatar')['sext']; $avatar_default = $this->config->item('imgrack_apath')."/recursos/noavatar.jpg"; if(file_exists($avatar_image)){ if(@GetImageSize($avatar_image)){ $image = imagecreatefromjpeg($avatar_image); }else{ $image = imagecreatefromjpeg($avatar_default); } }else{ $image = imagecreatefromjpeg($avatar_default); } if(!$image){$gen = true;$image = imagecreatefrompng($avatar_image);} imagecopyresampled($image_p, $image, 0, 0, 0, 0, 150, 150, 150, 150); if($gen){imagejpeg($image_p,$avatar_image);}else{imagejpeg($image_p);} imagedestroy($image_p); } } This code shows the default avatar if user's avatar not exist. If user's avatar exist and image extension is PNG, the code converts image PNG to JPG The problem is that the image have error. This is the image jpeg code: ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0