It might help to try to kinda cut down the volume of code to the relevant parts. I suppose it's hard to know what's relevant though. Personally, I think it's this.
$text_color = $image->colorAllocate($custom_colors->{text_color});
According to the GD docs, colorAllocate takes three args, not one. Presumably $custom_colors->{text_color} is a scalar arrayref. If that's the case, you'll want to explode it over the callstack like so.
$text_color = $image->colorAllocate(@{ $custom_colors->{text_color} } +);
If, on the other hand, your text color is a webified color (e.g., "#ffff00"), you'd do something like this instead
if( $custom_colors->{text_color} =~ m/#(..)(..)(..)/ ) { $text_color = $image->colorAllocate(map {hex($_)} ($1, $2, $3) ) }
-Paul
In reply to Re: GD::Image::colorAllocate errors
by jettero
in thread GD::Image::colorAllocate errors
by hesco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |