Home | History | Annotate | Download | only in libpng

Lines Matching full:palette

393 /* Dither file to 8-bit.  Supply a palette, the current number
394 * of elements in the palette, the maximum number of elements
396 * of colors is greater then the maximum number, the palette will be
412 png_set_quantize(png_structrp png_ptr, png_colorp palette,
451 /* Find the least used palette entries by starting a
482 /* Swap the palette around, and set up a table, if necessary */
498 palette[i] = palette[j];
520 tmp_color = palette[j];
521 palette[j] = palette[i];
522 palette[i] = tmp_color;
538 min_d = PNG_COLOR_DIST(palette[d_index], palette[0]);
543 d = PNG_COLOR_DIST(palette[d_index], palette[k]);
577 /* Initialize palette index arrays */
615 d = PNG_COLOR_DIST(palette[i], palette[j]);
664 palette[png_ptr->index_to_palette[j]]
665 = palette[num_new_palette];
728 if (png_ptr->palette == NULL)
730 png_ptr->palette = palette;
756 int r = (palette[i].red >> (8 - PNG_QUANTIZE_RED_BITS));
757 int g = (palette[i].green >> (8 - PNG_QUANTIZE_GREEN_BITS));
758 int b = (palette[i].blue >> (8 - PNG_QUANTIZE_BLUE_BITS));
867 * fully transparent palette entry to a full alpha channel--perhaps instead
1091 * the palette.
1096 * The intent is that these two routines should have palette or rgb operations
1102 /* Called to handle the (input) palette case. In png_do_read_transformations
1103 * the first step is to expand the palette if requested, so this code must
1105 * palette expansion, or only do them if there is no expansion.
1161 png_ptr->palette[png_ptr->background.index].red;
1163 png_ptr->palette[png_ptr->background.index].green;
1165 png_ptr->palette[png_ptr->background.index].blue;
1290 * the tests were repeated for the PALETTE color type here - this is no
1362 * 11) PNG_QUANTIZE (converts to palette)
1466 * can be performed directly on the palette, and some (such as rgb to gray)
1467 * can be optimized inside the palette. This is particularly true of the
1469 * in the palette even if the result is expanded to RGB or gray afterward.
1472 * earlier and the palette stuff is actually handled on the first row. This
1473 * leads to the reported bug that the palette returned by png_get_PLTE is not
1544 /* This needs to change - in the palette image case a whole set of tables are
1546 * each palette entry directly. Also, the test is too tricky - why check
1593 png_colorp palette = png_ptr->palette;
1677 palette[i] = back;
1683 v = png_ptr->gamma_to_1[palette[i].red];
1685 palette[i].red = png_ptr->gamma_from_1[w];
1687 v = png_ptr->gamma_to_1[palette[i].green];
1689 palette[i].green = png_ptr->gamma_from_1[w];
1691 v = png_ptr->gamma_to_1[palette[i].blue];
1693 palette[i].blue = png_ptr->gamma_from_1[w];
1698 palette[i].red = png_ptr->gamma_table[palette[i].red];
1699 palette[i].green = png_ptr->gamma_table[palette[i].green];
1700 palette[i].blue = png_ptr->gamma_table[palette[i].blue];
1810 png_colorp palette = png_ptr->palette;
1819 palette[i].red = png_ptr->gamma_table[palette[i].red];
1820 palette[i].green = png_ptr->gamma_table[palette[i].green];
1821 palette[i].blue = png_ptr->gamma_table[palette[i].blue];
1826 } /* color_type == PALETTE && !PNG_BACKGROUND transformation */
1841 png_colorp palette = png_ptr->palette;
1851 palette[i] = back;
1857 png_composite(palette[i].red, palette[i].red,
1860 png_composite(palette[i].green, palette[i].green,
1863 png_composite(palette[i].blue, palette[i].blue,
1890 int component = png_ptr->palette[i].red;
1893 png_ptr->palette[i].red = (png_byte)component;
1900 int component = png_ptr->palette[i].green;
1903 png_ptr->palette[i].green = (png_byte)component;
1910 int component = png_ptr->palette[i].blue;
1913 png_ptr->palette[i].blue = (png_byte)component;
1946 if (png_ptr->palette == NULL)
1947 png_error (png_ptr, "Palette is NULL in indexed image");
2239 /* The palette case has already been handled in the _init routine. */
4186 /* Expands a palette row to an RGB or RGBA row depending
4191 png_const_colorp palette, png_const_bytep trans_alpha, int num_trans)
4303 *dp-- = palette[*sp].blue;
4304 *dp-- = palette[*sp].green;
4305 *dp-- = palette[*sp].red;
4322 *dp-- = palette[*sp].blue;
4323 *dp-- = palette[*sp].green;
4324 *dp-- = palette[*sp].red;
4569 /* If the bit depth is 8 and the color type is not a palette type expand the
4733 png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
4841 /* Because png_init_read_transformations transforms the palette, unless