1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Merge branch 'PHP-5.6'

* PHP-5.6:
  updated NEWS
  Fix #66882: imagerotate by -90 degrees truncates image by 1px
This commit is contained in:
Christoph M. Becker
2015-07-13 22:30:43 +02:00
2 changed files with 19 additions and 2 deletions

View File

@@ -2178,10 +2178,13 @@ gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, in
/* no interpolation needed here */
switch (angle_rounded) {
case 9000:
case -27000:
case 9000:
return gdImageRotate90(src, 0);
case 18000:
case -18000:
case 18000:
return gdImageRotate180(src, 0);
case -9000:
case 27000:
return gdImageRotate270(src, 0);
}

View File

@@ -0,0 +1,14 @@
--TEST--
Bug #66882 (imagerotate by -90 degrees truncates image by 1px)
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$im = imagerotate(imagecreate(10, 10), -90, 0);
var_dump(imagesy($im), imagesx($im));
?>
--EXPECT--
int(10)
int(10)