You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
643 B

if not get_option('color-management-lcms')
subdir_done()
endif
if not dep_lcms2.found()
error('color-lcms plugin requires lcms2 which was not found. Or, you can use \'-Dcolor-management-lcms=false\'.')
endif
srcs_color_lcms = [
'color-lcms.c',
color: introduce weston_color_profile Roughly speaking, a color profile describes the color space of content or an output. Under the hood, the description includes one or more ways to map colors between the profile space and some standard profile connecting space (PCS). This object is not called a color space. A color space has a unique definition, while a color profile may contain multiple different mappings depending on render intent. Some of these mappings may be subjective, with an artistic touch. When a source color profile and a destination color profile are combined under a specific render intent, they produce a color transformation. Color transformations are already preresented by weston_color_transform. This patch adds the basic API for color profile objects. Everything worthwhile of these objects is implemented in the color managers: color-noop never creates these, and in color-lcms they are basically a container for cmsHPROFILE, the Little CMS object for color profiles. Color profile objects will not be interpreted outside of the color managers, unlike color transformations. For a start, the color manager API has one function to create color profiles: from ICC profile data. More creation functions for other sources will be added later. The API has errmsg return parameter for error messages. These are not simply weston_log()'d, because CM&HDR protocol will allow clients to trigger errors and the protocol handles that gracefully. Therefore instead of flooding the compositor logs, the error messages will probably need to be relayed back to clients. Color-lcms is expected to create a cmsHPROFILE for all kinds of color profiles, not just for those created from ICC profile data. Hence, color-lcms will fingerprint color profiles by the MD5 hash which Little CMS computes for us. The fingerprint is used for de-duplication: instead of creating copies, reference existing color profiles. This code is very much based on Sebastian Wick's earlier work on Weston color management, but structured and named differently. Co-authored-by: Sebastian Wick <sebastian@sebastianwick.net> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
4 years ago
'color-profile.c',
'color-transform.c',
]
deps_color_lcms = [
dep_libm,
dep_libweston_private,
dep_lcms2,
]
plugin_color_lcms = shared_library(
'color-lcms',
srcs_color_lcms,
include_directories: common_inc,
dependencies: deps_color_lcms,
name_prefix: '',
install: true,
install_dir: dir_module_libweston
)
env_modmap += 'color-lcms.so=@0@;'.format(plugin_color_lcms.full_path())