- i_quant_makemap(
quant,imgs,count) -
Analyzes the
countimages inimgsaccording to the rules inquantto build a color map (optimal or not depending onquant->make_colors). - i_quant_translate(
quant,img) -
Quantize the image given the palette in
quant.On success returns a pointer to a memory block of
img->xsize * img->ysizei_palidxentries.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.
- calc_part(part, 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.
- makemap_palette(quant, imgs, count)
-
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.
- i_quant_transparent(
quant,data,img,trans_index) -
Dither the alpha channel on
imginto the palette indexes indata. Pixels to be transparent are replaced withtrans_pixel.The method used depends on the tr_* members of
quant.
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 36:
'=item' outside of any '=over'
=over without closing =back
- Around line 38:
Unknown directive: =category
- Around line 102:
Unknown directive: =category
- Around line 1680:
Unknown directive: =category