Home | History | Annotate | Download | only in libpng

Lines Matching refs:palette

219     * for paletted images instead of supplying a palette index.  Note that
274 /* Dither RGB files down to 8 bit palette or reduce palettes
280 png_colorp palette;
282 /* This reduces the image to the application supplied palette */
283 if (/* We have our own palette */)
291 /* This reduces the image to the palette supplied in the file */
292 else if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette))
298 png_set_dither(png_ptr, palette, num_palette,
337 /* Optional call to gamma correct and add the background to the palette
339 * update the palette for you (ie you selected such a transform above).
566 png_colorp palette;
644 /* Set the palette if there is one. REQUIRED for indexed-color images */
645 palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH
647 /* ... Set palette colors ... */
648 png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH);
649 /* You must not free palette here, because png_set_PLTE only makes a link to
650 * the palette that you malloced. Wait until you are about to destroy
801 /* If you png_malloced a palette, free it here (don't free info_ptr->palette,
803 * libpng mallocs info_ptr->palette, libpng will free it). If you
807 png_free(png_ptr, palette);
808 palette = NULL;