forked from leftypol/leftypol
GdMediaHandler.php: correct rotation to anticlockwise degrees
This commit is contained in:
parent
83bf65e9be
commit
dbcb1b5bef
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ class GdMediaHandler implements MediaHandler {
|
||||||
|
|
||||||
if ($degrees !== 0) {
|
if ($degrees !== 0) {
|
||||||
self::enableTransparency($gd, $file_mime);
|
self::enableTransparency($gd, $file_mime);
|
||||||
$gd_other = \imagerotate($gd, $degrees, \imagecolorallocatealpha($gd, 0, 0, 0, 127));
|
$gd_other = \imagerotate($gd, 360 - $degrees, \imagecolorallocatealpha($gd, 0, 0, 0, 127));
|
||||||
\imagedestroy($gd);
|
\imagedestroy($gd);
|
||||||
if ($gd_other === false) {
|
if ($gd_other === false) {
|
||||||
throw new \RuntimeException("Error while correcting rotation of '$file_path'");
|
throw new \RuntimeException("Error while correcting rotation of '$file_path'");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue