Home | History | Annotate | Download | only in libtests

Lines Matching refs:npalette

383     int bit_depth, unsigned int npalette, int interlace_type,
390 pos = safecatn(buffer, bufsize, pos, npalette);
394 else if (npalette != 0)
717 int npalette; /* Number of entries in palette */
790 int npalette;
866 ps->npalette = 0;
890 ps->npalette = 0;
925 (*ppf)->npalette = 0;
948 pf->npalette = ps->npalette;
950 ps->npalette = 0;
1368 store_write_palette(png_store *ps, int npalette)
1377 if (npalette > 0)
1379 ps->palette = voidcast(store_palette_entry*, malloc(npalette *
1385 ps->npalette = npalette;
1393 store_current_palette(png_store *ps, int *npalette)
1405 *npalette = ps->current->npalette;
3173 make_standard_palette(png_store* ps, int npalette, int do_tRNS)
3244 /* 'values' contains 256 ARGB values, but we only need 'npalette'.
3245 * 'npalette' will always be a power of 2: 2, 4, 16 or 256. In the low
3249 * 'npalette' entries using an XOR mask generated here. This also
3250 * permutes the npalette == 256 case in a potentially useful way (there is
3253 palette = store_write_palette(ps, npalette);
3255 for (i=0; i<npalette; ++i)
3272 init_standard_palette(png_store *ps, png_structp pp, png_infop pi, int npalette,
3275 store_palette_entry *ppal = make_standard_palette(ps, npalette, do_tRNS);
3282 for (i=0; i<npalette; ++i)
3293 png_set_PLTE(pp, pi, palette, npalette);
3302 for (i=j=0; i<npalette; ++i)
4590 int npalette; /* Number of entries in the palette. */
4626 dp->npalette = 0;
4639 store_palette_entry *palette = store_current_palette(dp->ps, &dp->npalette);
4642 if (dp->npalette > 0)
4644 int i = dp->npalette;
4669 read_palette(store_palette palette, int *npalette, png_const_structp pp,
4677 *npalette = -1;
4679 if (png_get_PLTE(pp, pi, &pal, npalette) & PNG_INFO_PLTE)
4681 int i = *npalette;
4696 memset(palette + *npalette, 126, (256-*npalette) * sizeof *palette);
4701 if (*npalette != (-1))
4704 *npalette = 0;
4727 if (trans_alpha == NULL || num <= 0 || num > 256 || num > *npalette)
4733 for (num=*npalette; i<num; ++i)
4747 for (i=0, num=*npalette; i<num; ++i)
4764 int npalette;
4767 if (read_palette(palette, &npalette, pp, pi) != dp->is_transparent)
4770 if (npalette != dp->npalette)
4776 pos = safecatn(msg, sizeof msg, pos, dp->npalette);
4778 pos = safecatn(msg, sizeof msg, pos, npalette);
4783 int i = npalette; /* npalette is aliased */
6415 int npalette = (-1);
6417 (void)read_palette(out_palette, &npalette, pp, pi);
6418 if (npalette != dp->this.npalette)
10303 unsigned int npalette = 0;
10305 while (next_format(&colour_type, &bit_depth, &npalette,
10319 gamma_transform_test(pm, colour_type, bit_depth, npalette,