Lines Matching refs:gamma
836 * paletted. Most useful for gamma correction and simplification
1037 /* This is called to check a new gamma value against an existing one. The
1038 * routine returns false if the new gamma value should not be written.
1040 * 'from' says where the new gamma value comes from:
1042 * 0: the new gamma value is the libpng estimate for an ICC profile
1043 * 1: the new gamma value comes from a gAMA chunk
1044 * 2: the new gamma value comes from an sRGB chunk
1050 (png_muldiv(>est, colorspace->gamma, PNG_FP_1, gAMA) == 0 ||
1053 /* Either this is an sRGB image, in which case the calculated gamma
1055 * value libpng calculates for the gamma of the profile does not match the
1061 png_chunk_report(png_ptr, "gamma value does not match sRGB",
1069 png_chunk_report(png_ptr, "gamma
1084 * possible for 1/gamma to overflow the limit of 21474 and this means the
1085 * gamma value must be at least 5/100000 and hence at most 20000.0. For
1087 * 6250.0, which are truly ridiculous gamma values (and will produce
1096 errmsg = "gamma value out of range";
1099 /* Allow the application to set the gamma value more than once */
1114 /* Store this gamma value. */
1115 colorspace->gamma = gAMA;
1120 /* At present if the check_gamma test fails the gamma of the colorspace is
1122 * corresponds to the case where the existing gamma comes from an sRGB
1189 #endif /* GAMMA */
1840 /* sRGB sets known gamma, end points and (from the chunk) intent. */
1913 /* gamma */
1914 colorspace->gamma = PNG_GAMMA_sRGB_INVERSE;
3378 #ifdef PNG_GAMMA_SUPPORTED /* more fixed point functions for gamma */
3398 /* This is the shared test on whether a gamma value is 'significant' - whether
3399 * it is worth doing gamma correction.
3451 * but this API is only used for the product of file and screen gamma so it
3465 #ifdef PNG_READ_GAMMA_SUPPORTED /* gamma table code */
3467 /* Fixed point gamma.
3472 * To calculate gamma this code implements fast log() and exp() calls using only
3938 /* NOTE: this function expects the *inverse* of the overall gamma transformation
4025 /* Used from png_read_destroy and below to release the memory used by the gamma
4083 /* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
4094 * png_read_update_info. The warning is because building the gamma tables
4101 png_warning(png_ptr, "gamma table being rebuilt");
4108 png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->colorspace.gamma,
4117 png_reciprocal(png_ptr->colorspace.gamma));
4121 png_ptr->colorspace.gamma/* Probably doing rgb_to_gray */);
4143 /* 16-bit gamma code uses this equation:
4148 * pow(iv, gamma).
4150 * Thus the gamma table consists of up to 256 256-entry tables. The table
4190 png_ptr->screen_gamma > 0 ? png_product2(png_ptr->colorspace.gamma,
4195 png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->colorspace.gamma,
4204 png_reciprocal(png_ptr->colorspace.gamma));
4212 png_ptr->colorspace.gamma/* Probably doing rgb_to_gray */);
4247 * is used, not the gamma=1/2.2 approximation use elsewhere in libpng.