In: , ,
On: 2006 / 06 / 09
Shorter URL for this post: http://ozh.in/da

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

Metastuff

This entry "PHP GD : imagecolorallocate() Limitation" was posted on 09/06/2006 at 12:19 am and is tagged with , ,
Watch this discussion : Comments RSS 2.0.

No Comment yet

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?