Commit Graph

14 Commits

Author SHA1 Message Date
Michael Natterer 614c61a3dd Don't #include <glib.h> before <lcms.h>
The include claimed to be because of "inline" in the lcms header, but
that was probably lcms1, since there is no trace of inline in the
lcms2 header.
2014-04-10 20:48:22 +02:00
Michael Natterer f1223a741a libgimpcolor: move GIMP_LCMS_MD5_DIGEST_LENGTH to the .c file 2014-04-10 20:41:32 +02:00
Michael Natterer ba85bb78ba Bug 727185 - Converting to GIMP built-in sRGB produces the wrong RGB values
Profiles from disk have a lower precision than those created from
scratch via lcms API. Ensure identical profiles by returning a
"loaded" profile from gimp_lcms_create_srgb_profile() (simply do a
save/load roundtrip in memory).
2014-04-10 16:30:04 +02:00
Michael Natterer d7037650df libgimpcolor: add gimp_lcms_profile_get_label()
which returns a string meant to label the profile in the GUI, it's
either the profile's description, its model, or "(unnamed profile)" as
a fallback. Use the function instead of duplicating that logic
inconsistently and imcompletely all over the place.
2014-03-30 03:12:42 +02:00
Michael Natterer 32e47cf70d libgimpcolor: add gimp_lcms_profile_is_equal()
and remove all of our own MD5 digest code and API. is_equal() uses
lcms' own MD5 API which I missed before. Thanks Elle for pointing that
out :)
2014-03-29 10:40:47 +01:00
Michael Natterer b3395d989e libgimpcolor: return an optional MD5 digest from gimp_lcms_create_srgb_profile()
pass NULL in most places, use the feature in the lcms.c plu-gin.
2014-03-23 23:34:47 +01:00
Michael Natterer f322be2fac libgimpcolor: add gimp_lcms_profile_open_from_file() and _from_data()
which work just like their lcms counterparts but return an optional
md5 digest of the ICC data and a GError in case opening fails.
2014-03-16 15:57:14 +01:00
Michael Natterer ebc53672cb libgimpcolor: add gimp_lcms_profile_is_rgb() and _is_cmyk()
And change all lcms code to use it.
2014-03-15 21:47:13 +01:00
Michael Natterer 2cdf1985e6 libgimpcolor: add a bunch or information strings to the sRGB profile
so it can be treated like any other profile and needs no special
casing.
2014-03-15 00:09:35 +01:00
Michael Natterer 6f62d6b11b libgimpcolor: add gimp_lcms_profile_get_summary()
Which returns an "executive summary" of the profile, much like lcms1's
"profile info" API. Refactor common code out of the other string
getters.
2014-03-14 20:26:15 +01:00
Michael Natterer eee6fa1e4b libgimpcolor: start adding profile utility functions to gimplcms.[ch]
Add functions to get a profile's description, manufacturer, model and
copyright, and use them instead of implementing the same 10 times.

Also add a GimpColorProfile typedef which avoids both having to
include lcms globally or using a gpointer instead (which looks bad and
non-descriptive in an API).
2014-03-14 01:48:39 +01:00
Michael Natterer 76beb20b18 libgimpcolor: rename our sRGB profile to "GIMP built-in sRGB" 2014-03-03 21:45:43 +01:00
Elle Stone 78e2c4808d libgimpcolor: comment out line that makes V2 profile and add more docs 2014-02-16 22:09:46 +01:00
Elle Stone 05c5ca3216 Bug 723787 - Neutral sRGB profile matching Argyllcms sRGB.icm
Add gimp_lcms_create_srgb_profile() to libgimpcolor and use it where
we used to call cmsCreate_sRGBProfile().
2014-02-09 23:10:56 +01:00