#34336 [NEW]: imagerotate destroys transparency information
From: techtonik@php.net
Operating system: Windows 2000
PHP version: 4.4.0
PHP Bug Type: GD related
Bug description: imagerotate destroys transparency information
Description:
------------
Imagerotate doesn't preserve transparency information.
Next image was used in example below:
http://img24.imageshack.us/img24/228/spritepaw8alpha2os.png
Reproduce code:
---------------
<?php
$sprName = "sprite_paw8_alpha.png";
$spr = imagecreatefrompng($sprName); //create sprite object
//get sprite's transparent color
$sprTransparent = imagecolortransparent($spr);
//sprite rotation
$rotate = 15;
//rotate sprite, ?keeping transparent pixels
$spr = imagerotate($spr, $rotate, $sprTransparent);
header("Content-type: image/gif");
imagegif($spr);
imagedestroy($spr);
?>
Expected result:
----------------
Rotated image with transparent background.
Actual result:
--------------
Rotated image with black background.
--
Edit bug report at http://bugs.php.net/?id=34336&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34336&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34336&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34336&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34336&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34336&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34336&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34336&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34336&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34336&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34336&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34336&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34336&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34336&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34336&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34336&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34336&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34336&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34336&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34336&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34336&r=mysqlcfg
Thread (11 messages)
- techtonik@php.net
- sniper@php.net#34336 [Opn->Asn]: imagerotate destroys transparency information
- pajoye@php.net#34336 [Asn->Fbk]: ext/gd: imagerotate destroys transparency information
- techtonik@php.net#34336 [Fbk->Opn]: ext/gd: imagerotate destroys transparency information
- techtonik@php.net#34336 [Opn]: ext/gd: imagerotate destroys transparency information
- pajoye@php.net#34336 [Opn->Csd]: ext/gd: imagerotate destroys transparency information
- techtonik@php.net#34336 [Csd->Bgs]: ext/gd: imagerotate destroys transparency information
- techtonik@php.net#34336 [Bgs]: ext/gd: imagerotate destroys transparency information
- pajoye@php.net#34336 [Bgs]: ext/gd: imagerotate destroys transparency information
- techtonik@php.net#34336 [Bgs]: ext/gd: imagerotate destroys transparency information
- pajoye@php.net#34336 [Bgs]: ext/gd: imagerotate destroys transparency information