Lines Matching defs:tRNS

366  * indicating if a tRNS chunk was generated.
395 pos = safecat(buffer, bufsize, pos, "+tRNS");
453 unsigned int* palette_number, int low_depth_gray, int tRNS)
468 /* Add multiple palettes for colour type 3, one image with tRNS
474 if (((ct == 0/*GRAY*/ || ct/*RGB*/ == 2) && tRNS && pn < 2) ||
2061 unsigned int test_tRNS :1; /* Includes tRNS images */
3242 values[i][0] = 255; /* no transparency/tRNS chunk */
3268 * indicates whether or not to also set the tRNS chunk.
3299 png_byte tRNS[256];
3303 if ((tRNS[i] = ppal[i].alpha) < 255)
3308 tRNS[i] = 24;
3312 png_set_tRNS(pp, pi, tRNS, j, 0/*color*/);
3322 /* To make this useful the tRNS color needs to match at least one pixel.
3327 png_color_16 tRNS;
3330 R8(tRNS); /* makes unset fields random */
3336 R16(tRNS.red);
3337 R16(tRNS.green);
3338 tRNS.blue = tRNS.red ^ tRNS.green;
3339 tRNS.red &= mask;
3340 tRNS.green &= mask;
3341 tRNS.blue &= mask;
3346 R16(tRNS.red);
3347 tRNS.green = (png_uint_16)(tRNS.red * 257);
3348 tRNS.blue = (png_uint_16)(tRNS.green * 17);
3354 R16(tRNS.gray);
3355 tRNS.gray &= mask;
3358 png_set_tRNS(pp, pi, NULL, 0, &tRNS);
3787 init_standard_palette(ps, pp, pi, 1U << bit_depth, 1/*do tRNS*/);
3905 * and direct) are created with and without tRNS chunks.
4007 init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/);
4289 init_standard_palette(ps, pp, pi, 1U << bit_depth, 0/*do tRNS*/);
4581 int has_tRNS; /* color type GRAY or RGB with a tRNS chunk. */
4712 /* Oops, if a palette tRNS gets expanded png_read_update_info (at least so
4790 png_error(pp, "validate: PLTE or tRNS chunk changed");
4869 /* All 8 bits in tRNS for a palette image are significant - see the
4933 png_error(pp, "validate: invalid tRNS chunk with alpha image");
5645 unsigned int have_tRNS :1; /* tRNS chunk may need processing */
5808 /* Convert a palette image to an rgb image. This necessarily converts the tRNS
5809 * chunk at the same time, because the tRNS will be in palette form. The way
5835 /* Add an alpha channel; this will import the tRNS information because tRNS is
5861 * tRNS chunk to expand at this point.
5871 * original tRNS gray chunk valie.
6730 /* If there was a tRNS chunk that would get expanded and add an alpha
6783 /* We don't know yet whether there will be a tRNS chunk, but we know that
6807 /* NOTE: this doesn't result in tRNS expansion. */
6816 /* NOTE: we can actually pend the tRNS processing at this point because we
6900 /* 'expand' should do nothing for RGBA or GA input - no tRNS and the bit
6921 /* NOTE: don't expect this to expand tRNS */
6975 /* NOTE: prior to 1.7 libpng does SET_EXPAND as well, so tRNS is expanded. */
7954 /* Check for tRNS first: */
9935 * the values in tRNS.
10210 * without tRNS.
10561 * TODO: incorrect; the palette case sets tRNS and, now RGB and gray do,
11508 else if (strcmp(*argv, "--tRNS") == 0)