I\'m trying to upload a base64 encoded image and save after decoding it. Image is getting uploaded and saved, and I can access it using a URL and everything..but the image g
";
print_r($exif);
echo "
";
if (!empty($exif['Orientation'])) {
$imageResource = imagecreatefromjpeg($filePath);
switch ($exif['Orientation']) {
case 3:
$image = imagerotate($imageResource, 180, 0);
break;
case 6:
$image = imagerotate($imageResource, -90, 0);
break;
case 8:
$image = imagerotate($imageResource, 90, 0);
break;
default:
$image = $imageResource;
}
imagejpeg($image, $filename, 90);
}
}
?>