Home | History | Annotate | Download | only in libpng16

Lines Matching refs:gamma

136       png_warning(png_ptr, "Application must supply a known background gamma");
222 /* If there is no sRGB support this just sets the gamma to the standard
253 * gamma values are passed to the floating point API. This is safe and it
266 png_fixed_error(png_ptr, "gamma value");
291 * who use the inverse of the gamma value accidentally! Since some of these
295 * gamma of 36, and its reciprocal.)
298 png_error(png_ptr, "output gamma out of expected range");
300 /* The default file gamma is the inverse of the output gamma; the output
301 * gamma may be changed below so get the file value first:
312 * The differences disappear if the input/output ('screen') gamma is 1.0,
319 * with a default gamma value. Otherwise PNG_COMPOSE must not be set.
354 /* Only set the default gamma if the file gamma has not been set (this has
355 * the side effect that the gamma in a second call to png_set_alpha_mode will
358 if (png_ptr->colorspace.gamma == 0)
360 png_ptr->colorspace.gamma = file_gamma;
364 /* But always set the output gamma: */
374 png_ptr->background_gamma = png_ptr->colorspace.gamma; /* just in case */
816 /* Checking the gamma values for being >0 was added in 1.5.4 along with the
818 * of the previous implementation which allowed gamma processing to be
821 * accept '0' for the gamma value it takes, because it isn't always used.
828 png_error(png_ptr, "invalid file gamma in png_set_gamma");
831 png_error(png_ptr, "invalid screen gamma in png_set_gamma");
833 /* Set the gamma values unconditionally - this overrides the value in the PNG
835 * different, easier, way to default the file gamma.
837 png_ptr->colorspace.gamma = file_gamma;
1073 /* In the case of gamma transformations only do transformations on images where
1074 * the [file] gamma and screen_gamma are not close reciprocals, otherwise it
1080 /* PNG_GAMMA_THRESHOLD is the threshold for performing gamma
1084 * overflow here it is because of wacky gamma values so we
1291 * png_set_alpha_mode and this is another source for a default file gamma so
1297 /* The following temporary indicates if overall gamma correction is
1302 if (png_ptr->colorspace.gamma != 0) /* has been set */
1305 gamma_correction = png_gamma_threshold(png_ptr->colorspace.gamma,
1312 png_ptr->screen_gamma = png_reciprocal(png_ptr->colorspace.gamma);
1321 png_ptr->colorspace.gamma = png_reciprocal(png_ptr->screen_gamma);
1326 * third gamma value other than png_set_background with 'UNIQUE', and,
1329 png_ptr->screen_gamma = png_ptr->colorspace.gamma = PNG_FP_1;
1331 /* We have a gamma value now. */
1334 /* Now turn the gamma transformation on or off as appropriate. Notice
1336 * composition may independently cause gamma correction because it needs
1337 * linear data (e.g. if the file has a gAMA chunk but the screen gamma
1404 /* If the screen gamma is about 1.0 then the OPTIMIZE_ALPHA and ENCODE_ALPHA
1551 * PNG_GAMMA is cancelled even if the gamma is known? The test excludes the
1552 * PNG_COMPOSE case, so apparently if there is no *overall* gamma correction
1553 * the gamma tables will not be built even if composition is required on a
1554 * gamma encoded value.
1557 * file gamma - if it is not 1.0 both RGB_TO_GRAY and COMPOSE need the
1562 (png_gamma_significant(png_ptr->colorspace.gamma) != 0 ||
1565 (png_gamma_significant(png_ptr->colorspace.gamma) != 0 ||
1580 * optimized to do the gamma transform if present yet do_background has
1582 * double-gamma-correction happens. This is true in all versions of
1587 "libpng does not support gamma+background+rgb_to_gray");
1621 g = png_reciprocal(png_ptr->colorspace.gamma);
1622 gs = png_reciprocal2(png_ptr->colorspace.gamma,
1730 g = png_reciprocal(png_ptr->colorspace.gamma);
1731 gs = png_reciprocal2(png_ptr->colorspace.gamma,
1742 png_error(png_ptr, "invalid background gamma type");
1796 /* The background is now in screen gamma: */
1806 /* RGB_TO_GRAY needs to have non-gamma-corrected values! */
1826 /* Done the gamma correction. */
1836 /* No GAMMA transformation (see the hanging else 4 lines above) */
1979 * sometimes does the gamma transform and cancels the flag.
1981 * TODO: this looks wrong; the info_ptr should end up with a gamma equal to
1985 info_ptr->colorspace.gamma = png_ptr->colorspace.gamma;
2976 * gamma information is available to correct the encoding of the original RGB
3006 /* Notice that gamma to/from 1 are not necessarily inverses (if
3007 * there is an overall gamma correction). Prior to 1.5.5 this code
3185 * "background" is already in the screen gamma, while "background_1" is
3186 * at a gamma of 1.0. Paletted files have already been taken care of.
3416 /* Background is already in screen gamma */
3523 /* Background is already in screen gamma */
3604 /* Background is already in screen gamma */
3659 /* Background is already in screen gamma */
3734 /* Background is already in screen gamma */
3820 /* Background is already in screen gamma */
3923 /* Gamma correct the image, avoiding the alpha channel. Make sure
4126 /* Encode the alpha channel to the output gamma (the input channel is always
4838 /* Because RGB_TO_GRAY does the gamma transform. */
4843 /* Because PNG_COMPOSE does the gamma transform if there is something to
4900 * is efficient (particularly true in the case of gamma correction, where