Posted on 2005-11-16 12:07:02-08 by lsgko
Color set with colorAllocate not applied when I try to use it
I am opening an image with NewFromJpeg and then use
$newcolor=$im->colorAllocate(X,Y,Z)
to set the color. But when I use $newcolor with the polygon function, the color that is actually set is a color from the image (a color in a good amount of the image) and not the value I chose.

What could I be doing wrong? Can the colorAllocate function be used with truecolor images? If not, what should I be using?

Thanks in Advance.
Direct Responses: 11668 | Write a response
Posted on 2009-10-30 13:04:46-07 by diarmuidryan in response to 1319
Re: Color set with colorAllocate not applied when I try to use it
use colorResolve
$newcolor=$im->colorResolve(X,Y,Z)
diarmuid ryan, blue star web design
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.