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)
Want to share or tweet this post? Please use this short URL: http://ozh.in/da