From:             ceo at l-i-e dot com
Operating system: N/A
PHP version:      5.2.12
PHP Bug Type:     GD related
Bug description:  imagerotate transparent gif some angles invert new background

Description:
------------
imagerotate for a transparent input GIF, trying to output a transparent
output GIF.

At various angles it will fill the new / expanded background with the
wrong (non-transparent black) color.

This may be the same as http://bugs.php.net/bug.php?id=44429 but I can't
tell without the other guy's image either...

It could also be related to http://bugs.php.net/bug.php?id=39366 somehow,
but that pre-dates this quite a bit, and is supposedly fixed in CVS (now
SVN).  Plus that's PNG not GIF, though there may be shared code at work.

I do have a nice repro for you below.

NOTE:
This happened to me in PHP 5.2.5, and it's conceivable that it has been
fixed, but it has also been confirmed in 5.2.6 by Jochem Maas:
[quote]
I tested on  PHP5.2.6, with the following GD installed:

GD Version                 bundled (2.0.34 compatible)
FreeType Support         enabled
FreeType Linkage         with freetype
FreeType Version         2.3.7
GIF Read Support         enabled
GIF Create Support         enabled
JPG Support                 enabled
PNG Support                 enabled
WBMP Support                 enabled
XPM Support                 enabled
XBM Support                 enabled

I get the same result as you. I played with it a bit and the issue 'seems'
to revolve
around transparency in the original gif. I got the following code to
output what you
want but I have no idea if it's usable for you (you may be relying on the
transparency in
the original gif):


Reproduce code:
---------------
http://www.6112northwolcott.com/dogfight/rotate.phps

Expected result:
----------------
All the images in the actual result should have white / transparent
backgrounds, unless I'm being particularly dense today.


Actual result:
--------------
http://www.6112northwolcott.com/dogfight/rotate.htm


-- 
Edit bug report at http://bugs.php.net/?id=50610&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50610&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50610&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50610&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50610&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50610&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50610&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50610&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50610&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50610&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50610&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50610&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50610&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50610&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50610&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50610&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50610&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50610&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50610&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50610&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50610&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50610&r=mysqlcfg

Reply via email to