quant
imgs
count
Analyzes the count images in imgs according to the rules in quant to build a color map (optimal or not depending on quant->make_colors).
quant->make_colors
img
Quantize the image given the palette in quant.
On success returns a pointer to a memory block of img->xsize * img->ysize i_palidx entries.
img->xsize * img->ysize
i_palidx
On failure returns NULL.
You should call myfree() on the returned block when you're done with it.
This function will fail if the supplied palette contains no colors.
Calculates the new color limits for the given partition.
Giflib assumes that the limits for the non-split channels stay the same, but this strikes me as incorrect, especially if the colors tend to be color ramps.
Of course this could be optimized by not recalculating the channel we just sorted on, but it's not worth the effort right now.
Tests if all the given images are paletted and have a common palette, if they do it builds that palette.
A possible improvement might be to eliminate unused colors in the images palettes.
data
trans_index
Dither the alpha channel on img into the palette indexes in data. Pixels to be transparent are replaced with trans_pixel.
trans_pixel
The method used depends on the tr_* members of quant.
4 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
=over without closing =back
Unknown directive: =category
To install Imager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Imager
CPAN shell
perl -MCPAN -e shell install Imager
For more information on module installation, please visit the detailed CPAN module installation guide.