79413845

Date: 2025-02-05 06:45:54
Score: 0.5
Natty:
Report link

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
Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Roshan bhau