Top |
#define | CD_ICC_ERROR |
#define | CD_ICC_TYPE_ERROR |
#define | CD_TYPE_ICC |
enum | CdIccError |
struct | CdIccClass |
enum | CdIccLoadFlags |
enum | CdIccSaveFlags |
CdIcc |
gboolean cd_icc_load_data (CdIcc *icc
,const guint8 *data
,gsize data_len
,CdIccLoadFlags flags
,GError **error
);
Loads an ICC profile from raw byte data.
icc |
a CdIcc instance. |
|
data |
binary data. |
[array length=data_len] |
data_len |
Length of |
|
flags |
a set of CdIccLoadFlags |
|
error |
Since: 0.1.32
gboolean cd_icc_load_file (CdIcc *icc
,GFile *file
,CdIccLoadFlags flags
,GCancellable *cancellable
,GError **error
);
Loads an ICC profile from a local or remote file.
icc |
a CdIcc instance. |
|
file |
a GFile |
|
flags |
a set of CdIccLoadFlags |
|
cancellable |
A GCancellable or |
|
error |
Since: 0.1.32
gboolean cd_icc_load_fd (CdIcc *icc
,gint fd
,CdIccLoadFlags flags
,GError **error
);
Loads an ICC profile from an open file descriptor.
Since: 0.1.32
gboolean cd_icc_load_handle (CdIcc *icc
,gpointer handle
,CdIccLoadFlags flags
,GError **error
);
Set the internal cmsHPROFILE instance. This may be required if you create
the profile using cmsCreateRGBProfileTHR()
and then want to use the
functionality in CdIcc.
Do not call cmsCloseProfile()
on handle
in the caller, this will be done
when the icc
object is finalized. Treat the profile like it's been adopted
by this module.
To handle the internal error callback, you should use the thread-safe
creation function, e.g. cmsCreateNULLProfileTHR()
. The context_id
should be
set as the value of cd_icc_get_context()
for this object.
Additionally, this function cannot be called more than once, and also can't
be called if cd_icc_load_file()
has previously been used on the icc
object.
Since: 0.1.33
GBytes * cd_icc_save_data (CdIcc *icc
,CdIccSaveFlags flags
,GError **error
);
Saves an ICC profile to an allocated memory location.
Return vale: A GBytes structure, or NULL
for error
Since: 1.0.2
gboolean cd_icc_save_file (CdIcc *icc
,GFile *file
,CdIccSaveFlags flags
,GCancellable *cancellable
,GError **error
);
Saves an ICC profile to a local or remote file.
Return vale: TRUE
for success.
icc |
a CdIcc instance. |
|
file |
a GFile |
|
flags |
a set of CdIccSaveFlags |
|
cancellable |
A GCancellable or |
|
error |
Since: 0.1.32
gboolean cd_icc_save_default (CdIcc *icc
,CdIccSaveFlags flags
,GCancellable *cancellable
,GError **error
);
Saves an ICC profile to the default per-user location.
Return vale: TRUE
for success.
icc |
a CdIcc instance. |
|
flags |
a set of CdIccSaveFlags |
|
cancellable |
A GCancellable or |
|
error |
Since: 1.1.1
gchar *
cd_icc_to_string (CdIcc *icc
);
Returns a string representation of the ICC profile.
Since: 0.1.32
gpointer
cd_icc_get_handle (CdIcc *icc
);
Return the cmsHPROFILE instance used locally. This may be required if you are using the profile in a transform.
gpointer
cd_icc_get_context (CdIcc *icc
);
Return the cmsContext instance used locally. This may be required if you
are using native LCMS calls and then cd_icc_load_handle()
.
Since: 1.1.7
guint32
cd_icc_get_size (CdIcc *icc
);
Gets the ICC profile file size
Since: 0.1.32
const gchar *
cd_icc_get_filename (CdIcc *icc
);
Gets the filename of the ICC data, if one exists.
Since: 0.1.32
void cd_icc_set_filename (CdIcc *icc
,const gchar *filename
);
Sets the filename, which may be required if the ICC profile has been loaded
using cd_icc_load_fd()
from a disk cache.
Since: 1.1.1
gdouble
cd_icc_get_version (CdIcc *icc
);
Gets the ICC profile version, typically 2.1 or 4.2
Since: 0.1.32
void cd_icc_set_version (CdIcc *icc
,gdouble version
);
Sets the profile version.
Since: 0.1.32
void cd_icc_set_kind (CdIcc *icc
,CdProfileKind kind
);
Sets the profile kind.
Since: 0.1.32
CdColorspace
cd_icc_get_colorspace (CdIcc *icc
);
Gets the profile colorspace
Since: 0.1.32
void cd_icc_set_colorspace (CdIcc *icc
,CdColorspace colorspace
);
Sets the colorspace kind.
Since: 0.1.32
GHashTable *
cd_icc_get_metadata (CdIcc *icc
);
Gets all the metadata from the ICC profile.
Since: 0.1.32
const gchar * cd_icc_get_metadata_item (CdIcc *icc
,const gchar *key
);
Gets an item of data from the ICC metadata store.
Since: 0.1.32
void cd_icc_add_metadata (CdIcc *icc
,const gchar *key
,const gchar *value
);
Sets an item of data to the profile metadata, overwriting it if it already exists.
Since: 0.1.32
void cd_icc_remove_metadata (CdIcc *icc
,const gchar *key
);
Removes an item of metadata.
Since: 0.1.32
GPtrArray *
cd_icc_get_named_colors (CdIcc *icc
);
Gets any named colors in the profile.
This function will only return results if the profile was loaded with the
CD_ICC_LOAD_FLAGS_NAMED_COLORS
flag.
Since: 0.1.32
gboolean
cd_icc_get_can_delete (CdIcc *icc
);
Finds out if the profile could be deleted.
This is only applicable for profiles loaded with cd_icc_load_file()
as
obviously data and fd's cannot be sanely unlinked.
Since: 0.1.32
GDateTime *
cd_icc_get_created (CdIcc *icc
);
Gets the ICC creation date and time.
Since: 0.1.32
void cd_icc_set_created (CdIcc *icc
,GDateTime *creation_time
);
Sets the ICC creation date and time.
Since: 1.4.2
const gchar *
cd_icc_get_checksum (CdIcc *icc
);
Gets the profile checksum if one exists.
This will either be the embedded profile ID, or the file checksum if
the CdIcc object was loaded using cd_icc_load_data()
or cd_icc_load_file()
and the CD_ICC_LOAD_FLAGS_FALLBACK_MD5
flag is used.
Since: 0.1.32
const gchar * cd_icc_get_description (CdIcc *icc
,const gchar *locale
,GError **error
);
Gets the profile description. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned.
Since: 0.1.32
const gchar *
cd_icc_get_characterization_data (CdIcc *icc
);
Gets any characterization data used to build the profile.
This function will only return results if the profile was loaded with the
CD_ICC_LOAD_FLAGS_CHARACTERIZATION
flag.
Since: 1.1.1
void cd_icc_set_characterization_data (CdIcc *icc
,const gchar *data
);
Sets the characterization data used to build the profile.
Since: 1.1.1
const gchar * cd_icc_get_copyright (CdIcc *icc
,const gchar *locale
,GError **error
);
Gets the profile copyright. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned.
Since: 0.1.32
const gchar * cd_icc_get_manufacturer (CdIcc *icc
,const gchar *locale
,GError **error
);
Gets the profile manufacturer. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned.
Since: 0.1.32
const gchar * cd_icc_get_model (CdIcc *icc
,const gchar *locale
,GError **error
);
Gets the profile model. If the translated text is not available in the selected locale then the default untranslated (en_US) text is returned.
Since: 0.1.32
void cd_icc_set_description (CdIcc *icc
,const gchar *locale
,const gchar *value
);
Sets the profile description for a specific locale.
icc |
A valid CdIcc |
|
locale |
A locale, e.g. "en_GB.UTF-8" or |
|
value |
New UTF-8 string value. |
[allow-none] |
Since: 0.1.32
void cd_icc_set_description_items (CdIcc *icc
,GHashTable *values
);
Sets the profile descriptions for specific locales.
Since: 0.1.32
void cd_icc_set_copyright (CdIcc *icc
,const gchar *locale
,const gchar *value
);
Sets the profile _copyright for a specific locale.
icc |
A valid CdIcc |
|
locale |
A locale, e.g. "en_GB.UTF-8" or |
|
value |
New UTF-8 string value. |
[allow-none] |
Since: 0.1.32
void cd_icc_set_copyright_items (CdIcc *icc
,GHashTable *values
);
Sets the profile copyrights for specific locales.
Since: 0.1.32
void cd_icc_set_manufacturer (CdIcc *icc
,const gchar *locale
,const gchar *value
);
Sets the profile manufacturer for a specific locale.
icc |
A valid CdIcc |
|
locale |
A locale, e.g. "en_GB.UTF-8" or |
|
value |
New UTF-8 string value. |
[allow-none] |
Since: 0.1.32
void cd_icc_set_manufacturer_items (CdIcc *icc
,GHashTable *values
);
Sets the profile manufacturers for specific locales.
Since: 0.1.32
void cd_icc_set_model (CdIcc *icc
,const gchar *locale
,const gchar *value
);
Sets the profile model for a specific locale.
icc |
A valid CdIcc |
|
locale |
A locale, e.g. "en_GB.UTF-8" or |
|
value |
New UTF-8 string value. |
[allow-none] |
Since: 0.1.32
void cd_icc_set_model_items (CdIcc *icc
,GHashTable *values
);
Sets the profile models for specific locales.
Since: 0.1.32
const CdColorXYZ *
cd_icc_get_red (CdIcc *icc
);
Gets the profile red chromaticity value.
This function will only return results if the profile was loaded with the
CD_ICC_LOAD_FLAGS_PRIMARIES
flag.
Since: 0.1.32
const CdColorXYZ *
cd_icc_get_green (CdIcc *icc
);
Gets the profile green chromaticity value.
This function will only return results if the profile was loaded with the
CD_ICC_LOAD_FLAGS_PRIMARIES
flag.
Since: 0.1.32
const CdColorXYZ *
cd_icc_get_blue (CdIcc *icc
);
Gets the profile red chromaticity value.
This function will only return results if the profile was loaded with the
CD_ICC_LOAD_FLAGS_PRIMARIES
flag.
Since: 0.1.32
const CdColorXYZ *
cd_icc_get_white (CdIcc *icc
);
Gets the profile white point.
This function will only return results if the profile was loaded with the
CD_ICC_LOAD_FLAGS_PRIMARIES
flag.
Since: 0.1.32
guint
cd_icc_get_temperature (CdIcc *icc
);
Gets the ICC color temperature, rounded to the nearest 100K.
This function will only return results if the profile was loaded with the
CD_ICC_LOAD_FLAGS_PRIMARIES
flag.
Since: 0.1.32
GArray *
cd_icc_get_warnings (CdIcc *icc
);
Returns any warnings with profiles
Since: 0.1.34
gboolean cd_icc_create_from_edid (CdIcc *icc
,gdouble gamma_value
,const CdColorYxy *red
,const CdColorYxy *green
,const CdColorYxy *blue
,const CdColorYxy *white
,GError **error
);
Creates an ICC profile from EDID data.
Since: 0.1.32
gboolean cd_icc_create_from_edid_data (CdIcc *icc
,CdEdid *edid
,GError **error
);
Creates an ICC profile from EDID data.
Since: 1.1.2
gboolean cd_icc_create_default (CdIcc *icc
,GError **error
);
Creates a default sRGB ICC profile.
Since: 1.1.2
gboolean cd_icc_create_default_full (CdIcc *icc
,CdIccLoadFlags flags
,GError **error
);
Creates a default sRGB ICC profile.
Since: 1.4.5
GPtrArray * cd_icc_get_vcgt (CdIcc *icc
,guint size
,GError **error
);
Gets the video card calibration data from the profile.
Since: 0.1.34
gboolean cd_icc_set_vcgt (CdIcc *icc
,GPtrArray *vcgt
,GError **error
);
Sets the Video Card Gamma Table from the profile.
Return vale: TRUE
for success.
Since: 0.1.34
GPtrArray * cd_icc_get_response (CdIcc *icc
,guint size
,GError **error
);
Generates a response curve of a specified size.
Since: 0.1.34
gchar ** cd_icc_get_tags (CdIcc *icc
,GError **error
);
Returns the internal tag table. Most users do not need to do this.
Since: 1.1.6
GBytes * cd_icc_get_tag_data (CdIcc *icc
,const gchar *tag
,GError **error
);
Returns the raw data for the specific tag. Most users do not need to do this.
Since: 1.1.6
The ICC error code.
Flags used when loading an ICC profile.
No flags set. |
||
Parse any named colors in the profile. |
||
Parse all translations in the profile. |
||
Parse the metadata in the profile. |
||
Calculate the profile MD5 if a profile ID was not supplied in the profile. |
||
Parse the primaries in the profile. |
||
Load the characterization data from the profile |
||
Since: 0.1.32