By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,706 Members | 2,046 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,706 IT Pros & Developers. It's quick & easy.

gdmodule max colors

P: n/a

GD module has a constant gdMaxColors
From the web page:

Maximum number of colors in an image; GD will likely change this
figure in a future version.

Is there any way to increase this number?

In the GD FAQ, there is an entry about missing colors in JPEG images
that reads

When creating truecolor images, you need to call
gdImageCreateTrueColor, not gdImageCreate.

but I see no analog of this in gdmodule.

I tried increasing gdMaxColors to 2048 in gd.h of the GD src and
recompiled it and gdmodule. When I do
import gd
print gd.gdMaxColors


I get the right answer, but then I get a segfault when I try and
create my image.

I am creating pseudo-color plots in GD and would like to have a larger
color pallet.


John Hunter


Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.