Lines Matching full:background
94 /* Handle alpha and tRNS via a background color */
106 png_warning(png_ptr, "Application must supply a known background gamma");
111 png_memcpy(&(png_ptr->background), background_color,
798 /* Detect gray background and attempt to enable optimization
803 * background color might actually be gray yet not be flagged as such.
815 png_ptr->background.red == png_ptr->background.green &&
816 png_ptr->background.red == png_ptr->background.blue)
819 png_ptr->background.gray = png_ptr->background.red;
828 /* Expand background and tRNS chunks */
832 png_ptr->background.gray *= (png_uint_16)0xff;
833 png_ptr->background.red = png_ptr->background.green
834 = png_ptr->background.blue = png_ptr->background.gray;
844 png_ptr->background.gray *= (png_uint_16)0x55;
845 png_ptr->background.red = png_ptr->background.green
846 = png_ptr->background.blue = png_ptr->background.gray;
856 png_ptr->background.gray *= (png_uint_16)0x11;
857 png_ptr->background.red = png_ptr->background.green
858 = png_ptr->background.blue = png_ptr->background.gray;
870 png_ptr->background.red = png_ptr->background.green
871 = png_ptr->background.blue = png_ptr->background.gray;
877 png_ptr->background.red =
878 png_ptr->palette[png_ptr->background.index].red;
879 png_ptr->background.green =
880 png_ptr->palette[png_ptr->background.index].green;
881 png_ptr->background.blue =
882 png_ptr->palette[png_ptr->background.index].blue;
907 png_ptr->background_1 = png_ptr->background;
943 back.red = png_ptr->gamma_table[png_ptr->background.red];
944 back.green = png_ptr->gamma_table[png_ptr->background.green];
945 back.blue = png_ptr->gamma_table[png_ptr->background.blue];
947 back_1.red = png_ptr->gamma_to_1[png_ptr->background.red];
948 back_1.green = png_ptr->gamma_to_1[png_ptr->background.green];
949 back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue];
979 back.red = (png_byte)png_ptr->background.red;
980 back.green = (png_byte)png_ptr->background.green;
981 back.blue = (png_byte)png_ptr->background.blue;
986 (double)png_ptr->background.red/255, gs) * 255.0 + .5);
988 (double)png_ptr->background.green/255, gs) * 255.0
991 (double)png_ptr->background.blue/255, gs) * 255.0 + .5);
995 (double)png_ptr->background.red/255, g) * 255.0 + .5);
997 (double)png_ptr->background.green/255, g) * 255.0 + .5);
999 (double)png_ptr->background.blue/255, g) * 255.0 + .5);
1035 * has just reduced background composition and gamma correction
1070 (double)png_ptr->background.gray / m, g) * m + .5);
1071 png_ptr->background.gray = (png_uint_16)(pow(
1072 (double)png_ptr->background.gray / m, gs) * m + .5);
1074 if ((png_ptr->background.red != png_ptr->background.green) ||
1075 (png_ptr->background.red != png_ptr->background.blue) ||
1076 (png_ptr->background.red != png_ptr->background.gray))
1078 /* RGB or RGBA with color background */
1080 (double)png_ptr->background.red / m, g) * m + .5);
1082 (double)png_ptr->background.green / m, g) * m + .5);
1084 (double)png_ptr->background.blue / m, g) * m + .5);
1085 png_ptr->background.red = (png_uint_16)(pow(
1086 (double)png_ptr->background.red / m, gs) * m + .5);
1087 png_ptr->background.green = (png_uint_16)(pow(
1088 (double)png_ptr->background.green / m, gs) * m + .5);
1089 png_ptr->background.blue = (png_uint_16)(pow(
1090 (double)png_ptr->background.blue / m, gs) * m + .5);
1094 /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */
1097 png_ptr->background.red = png_ptr->background.green
1098 = png_ptr->background.blue = png_ptr->background.gray;
1136 back.red = (png_byte)png_ptr->background.red;
1137 back.green = (png_byte)png_ptr->background.green;
1138 back.blue = (png_byte)png_ptr->background.blue;
1236 info_ptr->background = png_ptr->background;
1426 * with background "in place" if transparent,
1428 * - Gray + alpha -> composite with gray background and remove alpha bytes,
1434 * background "in place" if transparent
1437 * - Gray + alpha -> convert to RGB + alpha, composite with background and
1440 * on gray background)
1444 * in advance if the background was gray or RGB, and position the gray-to-RGB
1449 /* If gray -> RGB, do so now only if background is non-gray; else do later
1462 &(png_ptr->trans_values), &(png_ptr->background)
2635 back.red = png_ptr->gamma_table[png_ptr->background.red];
2636 back.green = png_ptr->gamma_table[png_ptr->background.green];
2637 back.blue = png_ptr->gamma_table[png_ptr->background.blue];
2639 back_1.red = png_ptr->gamma_to_1[png_ptr->background.red];
2640 back_1.green = png_ptr->gamma_to_1[png_ptr->background.green];
2641 back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue];
2652 back.red = png_ptr->background.red;
2653 back.green = png_ptr->background.green;
2654 back.blue = png_ptr->background.blue;
2659 (png_byte)(pow((double)png_ptr->background.red/255, g) *
2662 (png_byte)(pow((double)png_ptr->background.green/255, g) *
2665 (png_byte)(pow((double)png_ptr->background.blue/255, g) *
2672 (png_byte)(pow((double)png_ptr->background.red/255, g) *
2675 (png_byte)(pow((double)png_ptr->background.green/255, g) *
2678 (png_byte)(pow((double)png_ptr->background.blue/255, g) *
2760 back.red = (png_byte)png_ptr->background.red;
2761 back.green = (png_byte)png_ptr->background.green;
2762 back.blue = (png_byte)png_ptr->background.blue;
2791 palette[i].red = (png_byte)png_ptr->background.red;
2792 palette[i].green = (png_byte)png_ptr->background.green;
2793 palette[i].blue = (png_byte)png_ptr->background.blue;
2803 /* Replace any alpha or transparency with the supplied background color.
2804 * "background" is already in the screen gamma, while "background_1" is
2809 png_color_16p trans_values, png_color_16p background
2825 if (background != NULL &&
2848 *sp |= (png_byte)(background->gray << shift);
2874 *sp |= (png_byte)(background->gray << shift);
2904 *sp |= (png_byte)(background->gray << shift);
2931 *sp |= (png_byte)(background->gray << shift);
2961 *sp |= (png_byte)(background->gray << shift);
2985 *sp = (png_byte)background->gray;
3001 *sp = (png_byte)background->gray;
3021 /* Background is already in screen gamma */
3022 *sp = (png_byte)((background->gray >> 8) & 0xff);
3023 *(sp + 1) = (png_byte)(background->gray & 0xff);
3044 *sp = (png_byte)((background->gray >> 8) & 0xff);
3045 *(sp + 1) = (png_byte)(background->gray & 0xff);
3069 *sp = (png_byte)background->red;
3070 *(sp + 1) = (png_byte)background->green;
3071 *(sp + 2) = (png_byte)background->blue;
3091 *sp = (png_byte)background->red;
3092 *(sp + 1) = (png_byte)background->green;
3093 *(sp + 2) = (png_byte)background->blue;
3112 /* Background is already in screen gamma */
3113 *sp = (png_byte)((background->red >> 8) & 0xff);
3114 *(sp + 1) = (png_byte)(background->red & 0xff);
3115 *(sp + 2) = (png_byte)((background->green >> 8) & 0xff);
3116 *(sp + 3) = (png_byte)(background->green & 0xff);
3117 *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff);
3118 *(sp + 5) = (png_byte)(background->blue & 0xff);
3147 *sp = (png_byte)((background->red >> 8) & 0xff);
3148 *(sp + 1) = (png_byte)(background->red & 0xff);
3149 *(sp + 2) = (png_byte)((background->green >> 8) & 0xff);
3150 *(sp + 3) = (png_byte)(background->green & 0xff);
3151 *(sp + 4) = (png_byte)((background->blue >> 8) & 0xff);
3152 *(sp + 5) = (png_byte)(background->blue & 0xff);
3180 /* Background is already in screen gamma */
3181 *dp = (png_byte)background->gray;
3209 *dp = (png_byte)background->gray;
3216 *dp = (png_byte)background->gray;
3247 /* Background is already in screen gamma */
3248 *dp = (png_byte)((background->gray >> 8) & 0xff);
3249 *(dp + 1) = (png_byte)(background->gray & 0xff);
3283 *dp = (png_byte)((background->gray >> 8) & 0xff);
3284 *(dp + 1) = (png_byte)(background->gray & 0xff);
3325 /* Background is already in screen gamma */
3326 *dp = (png_byte)background->red;
3327 *(dp + 1) = (png_byte)background->green;
3328 *(dp + 2) = (png_byte)background->blue;
3363 *dp = (png_byte)background->red;
3364 *(dp + 1) = (png_byte)background->green;
3365 *(dp + 2) = (png_byte)background->blue;
3369 png_composite(*dp, *sp, a, background->red);
3371 background->green);
3373 background->blue);
3406 /* Background is already in screen gamma */
3407 *dp = (png_byte)((background->red >> 8) & 0xff);
3408 background->red & 0xff);
3409 *(dp + 2) = (png_byte)((background->green >> 8) & 0xff);
3410 *(dp + 3) = (png_byte)(background->green & 0xff);
3411 *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);
3412 *(dp + 5) = (png_byte)(background->blue & 0xff);
3451 *dp = (png_byte)((background->red >> 8) & 0xff);
3452 *(dp + 1) = (png_byte)(background->red & 0xff);
3453 *(dp + 2) = (png_byte)((background->green >> 8) & 0xff);
3454 *(dp + 3) = (png_byte)(background->green & 0xff);
3455 *(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);
3456 *(dp + 5) = (png_byte)(background->blue & 0xff);
3468 png_composite_16(v, r, a, background->red);
3471 png_composite_16(v, g, a, background->green);
3474 png_composite_16(v, b, a, background->blue);
4177 * a background color has been specified and the file_gamma