From: sprice at wisc dot edu Operating system: Mac 10.3 PHP version: 4.3.4 PHP Bug Type: GD related Bug description: ImageRotate() inverts/blacks the alpha channel
Description: ------------ ImageRotate() is messing with my alpha channel. Examples to follow. Reproduce code: --------------- <?php header( 'Content-type: image/png' ); $img = ImageCreate(100, 60); $white = ImageColorResolve($img, 255, 255, 255); $almost_clear = ImageColorResolveAlpha($img, 1, 1, 250, 63); ImageFilledRectangle($img, 0, 0, 50, 30, $white); ImageFilledRectangle($img, 10, 10, 100, 60, $almost_clear); ImagePNG($img); // This works //ImagePNG(ImageRotate($img, 90, $almost_clear)); // This is all black ?> Expected result: ---------------- When you run this as is, you get a semitransparent blue rectangle. Actual result: -------------- If you replace the commented out ImagePNG() with the commented one, the alpha channel inverts itself. As you increase the transparency of $almost_clear, it becomes black (in contrast to the non- ImageRotate() line). -- Edit bug report at http://bugs.php.net/?id=26144&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26144&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26144&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26144&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26144&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26144&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26144&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26144&r=support Expected behavior: http://bugs.php.net/fix.php?id=26144&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26144&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26144&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26144&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26144&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26144&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26144&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26144&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26144&r=float