我有这个脚本,它旋转图像旋转。但是,它在切换功能后结束。它没有回应“成功”;有没有办法阻止它停止脚本?
$exif = exif_read_data('img/picture.png');
$ort = $exif['IFD0']['Orientation'];
switch($ort)
{
case 1: // nothing
break;
case 2: // horizontal flip
$image->flipImage($public,1);
break;
case 3: // 180 rotate left
$image->rotateImage($public,180);
break;
case 4: // vertical flip
$image->flipImage($public,2);
break;
case 5: // vertical flip + 90 rotate right
$image->flipImage($public, 2);
$image->rotateImage($public, -90);
break;
case 6: // 90 rotate right
$image->rotateImage($public, -90);
break;
case 7: // horizontal flip + 90 rotate right
$image->flipImage($public,1);
$image->rotateImage($public, -90);
break;
case 8: // 90 rotate left
$image->rotateImage($public, 90);
break;
}
echo "success";