ID:               21834
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: Win2k
 PHP Version:      4.3.0
 New Comment:

This will need some study and confirmation.  For example here is one
user comment:

"With gd 2.x, the first color allocated with imagecolorallocate()
appears to no longer be made the background color. You can use
imagefill() to set the background color."

Granted whatever behavior exists needs to be documented ... but what is
the exact behavior?  Please report further findings in this bug report
:)


Previous Comments:
------------------------------------------------------------------------

[2003-01-22 22:58:54] [EMAIL PROTECTED]

I discovered from experimentation that the first call to
imagecolorallocate() for a given image, sets the background colour for
that image.

This would be worth noting in the manual page for imagecolorallocate().
 Someone has pointed it out in a user comment, but it is a fairly
important aspect of the function's behaviour, and IMO should be part of
the official documentation.

I'm using php_gd2 as bundled with PHP 4.3.0, and I've only tried PNG
images so far.  I can't say for sure if imagecolorallocate() exhibits
this same behaviour for other image types.

As an aside, the GD functionality is great.  I'm loving the idea of
creating dynamic images in my app.

May the Force be with you.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21834&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to