Rotate and flip the image with GD

This commit is contained in:
Quentin Ligier 2016-08-20 12:34:31 +02:00 committed by GitHub
parent c7d0e5215d
commit e5a88c918f

View File

@ -554,8 +554,7 @@ final class Photo {
case 2: case 2:
// mirror // mirror
// not yet implemented imageflip($sourceImg, IMG_FLIP_HORIZONTAL);
return false;
break; break;
case 3: case 3:
@ -564,14 +563,16 @@ final class Photo {
case 4: case 4:
// rotate 180 and mirror // rotate 180 and mirror
// not yet implemented imageflip($sourceImg, IMG_FLIP_VERTICAL);
return false;
break; break;
case 5: case 5:
// rotate 90 and mirror // rotate 90 and mirror
// not yet implemented $sourceImg = imagerotate($sourceImg, -90, 0);
return false; $newWidth = $info['height'];
$newHeight = $info['width'];
$swapSize = true;
imageflip($sourceImg, IMG_FLIP_HORIZONTAL);
break; break;
case 6: case 6:
@ -583,8 +584,11 @@ final class Photo {
case 7: case 7:
// rotate -90 and mirror // rotate -90 and mirror
// not yet implemented $sourceImg = imagerotate($sourceImg, 90, 0);
return false; $newWidth = $info['height'];
$newHeight = $info['width'];
$swapSize = true;
imageflip($sourceImg, IMG_FLIP_HORIZONTAL);
break; break;
case 8: case 8: