Lines Matching refs:red
760 int r = (palette[i].red >> (8 - PNG_QUANTIZE_RED_BITS)); in png_set_quantize()
957 png_fixed_point red, png_fixed_point green) in png_set_rgb_to_gray_fixed() argument
999 if (red >= 0 && green >= 0 && red + green <= PNG_FP_1) in png_set_rgb_to_gray_fixed()
1008 red_int = (png_uint_16)(((png_uint_32)red*32768)/100000); in png_set_rgb_to_gray_fixed()
1018 if (red >= 0 && green >= 0) in png_set_rgb_to_gray_fixed()
1045 png_set_rgb_to_gray(png_structrp png_ptr, int error_action, double red, in png_set_rgb_to_gray() argument
1049 png_fixed(png_ptr, red, "rgb to gray red coefficient"), in png_set_rgb_to_gray()
1163 png_ptr->background.red = in png_init_palette_transformations()
1164 png_ptr->palette[png_ptr->background.index].red; in png_init_palette_transformations()
1263 png_ptr->background.red = png_ptr->background.green = in png_init_rgb_transformations()
1268 png_ptr->trans_color.red = png_ptr->trans_color.green = in png_init_rgb_transformations()
1457 if (png_ptr->background.red == png_ptr->background.green && in png_init_read_transformations()
1458 png_ptr->background.red == png_ptr->background.blue) in png_init_read_transformations()
1461 png_ptr->background.gray = png_ptr->background.red; in png_init_read_transformations()
1503 CHOP(png_ptr->background.red); in png_init_read_transformations()
1525 png_ptr->background.red = (png_uint_16)(png_ptr->background.red * 257); in png_init_read_transformations()
1601 back.red = png_ptr->gamma_table[png_ptr->background.red]; in png_init_read_transformations()
1605 back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; in png_init_read_transformations()
1639 back.red = png_gamma_8bit_correct(png_ptr->background.red, in png_init_read_transformations()
1649 back.red = (png_byte)png_ptr->background.red; in png_init_read_transformations()
1656 back_1.red = png_gamma_8bit_correct(png_ptr->background.red, in png_init_read_transformations()
1666 back_1.red = (png_byte)png_ptr->background.red; in png_init_read_transformations()
1685 v = png_ptr->gamma_to_1[palette[i].red]; in png_init_read_transformations()
1686 png_composite(w, v, png_ptr->trans_alpha[i], back_1.red); in png_init_read_transformations()
1687 palette[i].red = png_ptr->gamma_from_1[w]; in png_init_read_transformations()
1700 palette[i].red = png_ptr->gamma_table[palette[i].red]; in png_init_read_transformations()
1756 if ((png_ptr->background.red != png_ptr->background.green) || in png_init_read_transformations()
1757 (png_ptr->background.red != png_ptr->background.blue) || in png_init_read_transformations()
1758 (png_ptr->background.red != png_ptr->background.gray)) in png_init_read_transformations()
1763 png_ptr->background_1.red = png_gamma_correct(png_ptr, in png_init_read_transformations()
1764 png_ptr->background.red, g); in png_init_read_transformations()
1775 png_ptr->background.red = png_gamma_correct(png_ptr, in png_init_read_transformations()
1776 png_ptr->background.red, gs); in png_init_read_transformations()
1789 png_ptr->background_1.red = png_ptr->background_1.green in png_init_read_transformations()
1792 png_ptr->background.red = png_ptr->background.green in png_init_read_transformations()
1821 palette[i].red = png_ptr->gamma_table[palette[i].red]; in png_init_read_transformations()
1845 back.red = (png_byte)png_ptr->background.red; in png_init_read_transformations()
1859 png_composite(palette[i].red, palette[i].red, in png_init_read_transformations()
1860 png_ptr->trans_alpha[i], back.red); in png_init_read_transformations()
1881 int shift = 8 - png_ptr->sig_bit.red; in png_init_read_transformations()
1892 int component = png_ptr->palette[i].red; in png_init_read_transformations()
1895 png_ptr->palette[i].red = (png_byte)component; in png_init_read_transformations()
2254 shift[channels++] = bit_depth - sig_bits->red; in png_do_unshift()
3019 png_byte red = *(sp++); in png_do_rgb_to_gray() local
3023 if (red != green || red != blue) in png_do_rgb_to_gray()
3025 red = png_ptr->gamma_to_1[red]; in png_do_rgb_to_gray()
3031 (rc*red + gc*green + bc*blue + 16384)>>15]; in png_do_rgb_to_gray()
3040 red = png_ptr->gamma_table[red]; in png_do_rgb_to_gray()
3042 *(dp++) = red; in png_do_rgb_to_gray()
3058 png_byte red = *(sp++); in png_do_rgb_to_gray() local
3062 if (red != green || red != blue) in png_do_rgb_to_gray()
3068 *(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15); in png_do_rgb_to_gray()
3072 *(dp++) = red; in png_do_rgb_to_gray()
3091 png_uint_16 red, green, blue, w; in png_do_rgb_to_gray() local
3094 hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3098 if (red == green && red == blue) in png_do_rgb_to_gray()
3101 w = png_ptr->gamma_16_table[(red & 0xff) in png_do_rgb_to_gray()
3102 >> png_ptr->gamma_shift][red >> 8]; in png_do_rgb_to_gray()
3105 w = red; in png_do_rgb_to_gray()
3110 png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red & 0xff) in png_do_rgb_to_gray()
3111 >> png_ptr->gamma_shift][red>>8]; in png_do_rgb_to_gray()
3143 png_uint_16 red, green, blue, gray16; in png_do_rgb_to_gray() local
3146 hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo)); in png_do_rgb_to_gray()
3150 if (red != green || red != blue) in png_do_rgb_to_gray()
3157 gray16 = (png_uint_16)((rc*red + gc*green + bc*blue + 16384) >> in png_do_rgb_to_gray()
3469 if (*sp == png_ptr->trans_color.red && in png_do_compose()
3473 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3492 if (*sp == png_ptr->trans_color.red && in png_do_compose()
3496 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3519 if (r == png_ptr->trans_color.red && in png_do_compose()
3524 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3525 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3566 if (r == png_ptr->trans_color.red && in png_do_compose()
3570 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3571 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3735 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3745 png_composite(w, v, a, png_ptr->background_1.red); in png_do_compose()
3771 *sp = (png_byte)png_ptr->background.red; in png_do_compose()
3778 png_composite(*sp, *sp, a, png_ptr->background.red); in png_do_compose()
3821 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3822 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3837 png_composite_16(w, v, a, png_ptr->background_1.red); in png_do_compose()
3876 *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); in png_do_compose()
3877 *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); in png_do_compose()
3897 png_composite_16(v, r, a, png_ptr->background.red); in png_do_compose()
4312 *dp-- = palette[*sp].red; in png_do_expand_palette()
4331 *dp-- = palette[*sp].red; in png_do_expand_palette()
4513 png_byte red = (png_byte)(trans_color->red & 0xff); in png_do_expand() local
4520 if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue) in png_do_expand()
4533 png_byte red_high = (png_byte)((trans_color->red >> 8) & 0xff); in png_do_expand()
4536 png_byte red_low = (png_byte)(trans_color->red & 0xff); in png_do_expand()