johnrcomeau has asked for the wisdom of the Perl Monks concerning the following question:
I have noticed that the palette seems to consist of a lot of neutral, low-saturation colors. I suppose they have less color quantization error for more neutral and prevalent pixels. I would like to have some control over the palette so that I can preserve some of the high-saturation colors. I'd like to be able to specify one or two of the colors in the palette and let the module determine the other 10 or 11 colors. I can't find a lot of sample code on how to control how the pallete is formed, and the documentation I've found says that specifying a color list is a feature to be added to Imager in the future. Can anyone please help me fix one or two colors in the palette? Thanks.my $paletted_img = $img->to_paletted({max_colors => 12, colors => \@colors, });
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: control palette with Imager
by tangent (Parson) on Apr 28, 2014 at 22:45 UTC | |
|
Re: control palette with Imager
by wjw (Priest) on Apr 28, 2014 at 19:27 UTC | |
|
Re: control palette with Imager
by GotToBTru (Prior) on Apr 28, 2014 at 21:31 UTC |