Did you know it ? PHP GD's imagecolorallocate() can only allocate 255 colors in a palette based image created by imagecreate() (no such limitation when you use function imagecreatetruecolors() by the way).
This sounds pretty stupid as well as rather undocumented, but anyway, here is a new version of my GD Gradient Fill PHP class, which now produces correct colors for images larger than 256 pixels (hence containing gradients with more than 256 colors)
Shorter URL
Want to share or tweet this post? Please use this short URL: http://ozh.in/da
This entry "PHP GD : imagecolorallocate() Limitation" was posted on 09/06/2006 at 12:19 am and is tagged with Code, GD, PHP
Watch this discussion : Comments RSS 2.0.