Bug #64898 [Asn]: imagerotate is broken
| From: | pajoye@php.net | Date: | Sun, 26 May 2013 23:49:49 +0000 |
| Subject: | Bug #64898 [Asn]: imagerotate is broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-179138@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64898&edit=1
ID: 64898
Updated by: pajoye@php.net
Reported by: douglas dot wright at pre-school dot org dot uk
Summary: imagerotate is broken
Status: Assigned
Type: Bug
Package: GD related
Operating System: Windows 7
PHP Version: 5.5.0RC1
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
Reproduced. Have to figure out what went wrong lately with the bilinear
interpolation and the rotate function.
As a work around, add:
imagesetinterpolation($source, IMG_BICUBIC_FIXED); // or any prefered algorithm
before the imagerotate call.
Previous Comments:
------------------------------------------------------------------------
[2013-05-22 12:54:56] douglas dot wright at pre-school dot org dot uk
Sure, the one I used in the testcase is https://www.pre-school.org.uk/publicationimage/236/thumbnail/?size=200
------------------------------------------------------------------------
[2013-05-22 12:46:46] pajoye@php.net
Do you have the original image please? You can use tinypic too but I need the
original images.
------------------------------------------------------------------------
[2013-05-22 10:43:55] douglas dot wright at pre-school dot org dot uk
Description:
------------
When attempting to rotate an image using PHP5.5RC1, the output is corrupted. This is a regression
from latest stable PHP 5.4
Test script:
---------------
<?php
$source = imagecreatefrompng('original.png');
$rotate = imagerotate($source, 45, imagecolorallocate($source,255,255,255));
imagepng($rotate, 'rotated.png');
Expected result:
----------------
Please see comparison screenshot at http://tinypic.com/r/34t8qdu/5
Actual result:
--------------
Please see comparison screenshot at http://tinypic.com/r/34t8qdu/5
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64898&edit=1