diff options
author | Stefano Karapetsas <[email protected]> | 2013-09-26 10:24:01 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-09-26 10:24:01 +0200 |
commit | 94214db85381f246290cfebb61de02aea2a441b3 (patch) | |
tree | 8f6871f7bfc8fcc2f5bf0334c37e6982ba24c3aa /src/eom-metadata-reader-png.c | |
parent | 144066a7196fb19e1cb976d7ff7bdee353818fd5 (diff) | |
download | eom-94214db85381f246290cfebb61de02aea2a441b3.tar.bz2 eom-94214db85381f246290cfebb61de02aea2a441b3.tar.xz |
Migration to lcms2
Closes #25
https://github.com/mate-desktop/mate-image-viewer/issues/25
See https://git.gnome.org/browse/eog/commit/?id=3c3a835
Diffstat (limited to 'src/eom-metadata-reader-png.c')
-rw-r--r-- | src/eom-metadata-reader-png.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/eom-metadata-reader-png.c b/src/eom-metadata-reader-png.c index 242e52a..c475e06 100644 --- a/src/eom-metadata-reader-png.c +++ b/src/eom-metadata-reader-png.c @@ -563,8 +563,6 @@ eom_metadata_reader_png_get_icc_profile (EomMetadataReaderPng *emr) return NULL; } - cmsErrorAction (LCMS_ERROR_SHOW); - profile = cmsOpenProfileFromMem(outbuf, zstr.total_out); inflateEnd (&zstr); g_free (outbuf); @@ -583,7 +581,7 @@ eom_metadata_reader_png_get_icc_profile (EomMetadataReaderPng *emr) if (!profile && priv->cHRM_chunk) { cmsCIExyY whitepoint; cmsCIExyYTRIPLE primaries; - LPGAMMATABLE gamma[3]; + cmsToneCurve *gamma[3]; double gammaValue = 2.2; // 2.2 should be a sane default gamma /* This uglyness extracts the chromacity and whitepoint values @@ -611,11 +609,11 @@ eom_metadata_reader_png_get_icc_profile (EomMetadataReaderPng *emr) if (priv->gAMA_chunk) gammaValue = (double) 1.0/EXTRACT_DOUBLE_UINT_BLOCK_OFFSET (priv->gAMA_chunk, 0, 100000); - gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma (256, gammaValue); + gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma (NULL, gammaValue); profile = cmsCreateRGBProfile (&whitepoint, &primaries, gamma); - cmsFreeGamma(gamma[0]); + cmsFreeToneCurve(gamma[0]); } return profile; |