Lines Matching defs:alpha

533  * Use the alternative algorithm for compositing alpha samples that
588 png_byte alpha; /* for alpha channel files */
603 png_uint_16 alpha;
610 /* When the depth of the sPLT palette is 8 bits, the color and alpha samples
1122 /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
1163 /* How the alpha channel is interpreted - this affects how the color channels of
1164 * a PNG file are returned when an alpha channel, or tRNS chunk in a palette
1169 * with the alpha samples.
1171 * The default is to return data according to the PNG specification: the alpha
1178 * The alternative is to 'associate' the alpha with the color information by
1179 * storing color channel values that have been scaled by the alpha. The
1187 * latter being the two common names for associated alpha color channels.)
1191 * possible to optimize the handling of alpha by storing the opaque pixels in
1194 * standard alpha composition is relatively low, because the pixels are
1196 * values is acceptable. (This is not true if the alpha channel is used to
1199 * treated as opaque only if the alpha value is equal to the maximum value.
1201 * The final choice is to gamma encode the alpha channel as well. This is
1203 * correctly undoes the encoding before handling alpha composition. Use this
1216 #define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */
1237 * opaque pixels however pixels with lower alpha values are not encoded,
1296 * required overall gamma correction and, where necessary, alpha
1300 * This is the default libpng handling of the alpha channel - it is not
1392 /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
1437 /* Handle alpha and tRNS by replacing with a background color. Prior to
2517 /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
2519 # define png_composite(composite, fg, alpha, bg) \
2521 * (png_uint_16)(alpha) \
2523 - (png_uint_16)(alpha)) + (png_uint_16)128); \
2526 # define png_composite_16(composite, fg, alpha, bg) \
2528 * (png_uint_32)(alpha) \
2530 - (png_uint_32)(alpha)) + (png_uint_32)32768L); \
2535 # define png_composite(composite, fg, alpha, bg) \
2536 (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
2537 (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
2540 # define png_composite_16(composite, fg, alpha, bg) \
2541 (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
2542 (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \