![]() |
![]() |
![]() |
GNOME Color Manager Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
struct GcmProfile; struct GcmProfileClass; GcmProfile * gcm_profile_new (void
); gboolean gcm_profile_parse (GcmProfile *profile
,GFile *file
,GError **error
); gboolean gcm_profile_parse_data (GcmProfile *profile
,const guint8 *data
,gsize length
,GError **error
); gboolean gcm_profile_save (GcmProfile *profile
,const gchar *filename
,GError **error
); gpointer gcm_profile_get_handle (GcmProfile *profile
); const gchar * gcm_profile_get_checksum (GcmProfile *profile
); gboolean gcm_profile_get_can_delete (GcmProfile *profile
); GcmClut * gcm_profile_generate_vcgt (GcmProfile *profile
,guint size
); GcmClut * gcm_profile_generate_curve (GcmProfile *profile
,guint size
); gboolean gcm_profile_set_vcgt_from_data (GcmProfile *profile
,guint16 *red
,guint16 *green
,guint16 *blue
,guint size
,GError **error
); gboolean gcm_profile_set_whitepoint (GcmProfile *profile
,const GcmColorXYZ *whitepoint
,GError **error
); gboolean gcm_profile_set_primaries (GcmProfile *profile
,const GcmColorXYZ *red
,const GcmColorXYZ *green
,const GcmColorXYZ *blue
,GError **error
); gboolean gcm_profile_create_from_chroma (GcmProfile *profile
,gdouble gamma
,const GcmColorYxy *red
,const GcmColorYxy *green
,const GcmColorYxy *blue
,const GcmColorYxy *white
,GError **error
); gboolean gcm_profile_guess_and_add_vcgt (GcmProfile *profile
,GError **error
); const gchar * gcm_profile_get_description (GcmProfile *profile
); void gcm_profile_set_description (GcmProfile *profile
,const gchar *description
); GFile * gcm_profile_get_file (GcmProfile *profile
); void gcm_profile_set_file (GcmProfile *profile
,GFile *file
); const gchar * gcm_profile_get_filename (GcmProfile *profile
); const gchar * gcm_profile_get_copyright (GcmProfile *profile
); void gcm_profile_set_copyright (GcmProfile *profile
,const gchar *copyright
); const gchar * gcm_profile_get_manufacturer (GcmProfile *profile
); void gcm_profile_set_manufacturer (GcmProfile *profile
,const gchar *manufacturer
); const gchar * gcm_profile_get_model (GcmProfile *profile
); void gcm_profile_set_model (GcmProfile *profile
,const gchar *model
); const gchar * gcm_profile_get_datetime (GcmProfile *profile
); void gcm_profile_set_datetime (GcmProfile *profile
,const gchar *datetime
); guint gcm_profile_get_size (GcmProfile *profile
); GcmProfileKind gcm_profile_get_kind (GcmProfile *profile
); void gcm_profile_set_kind (GcmProfile *profile
,GcmProfileKind kind
); GcmColorspace gcm_profile_get_colorspace (GcmProfile *profile
); void gcm_profile_set_colorspace (GcmProfile *profile
,GcmColorspace colorspace
); gboolean gcm_profile_get_has_vcgt (GcmProfile *profile
); gboolean gcm_profile_has_colorspace_description (GcmProfile *profile
); guint gcm_profile_get_temperature (GcmProfile *profile
); const GcmColorXYZ * gcm_profile_get_red (GcmProfile *profile
); const GcmColorXYZ * gcm_profile_get_green (GcmProfile *profile
); const GcmColorXYZ * gcm_profile_get_blue (GcmProfile *profile
); const GcmColorXYZ * gcm_profile_get_white (GcmProfile *profile
); const gchar * gcm_profile_get_data (GcmProfile *profile
,const gchar *key
); void gcm_profile_set_data (GcmProfile *profile
,const gchar *key
,const gchar *data
); GcmProfilePrivate;
"black" GcmColorXYZ* : Read / Write "blue" GcmColorXYZ* : Read / Write "can-delete" gboolean : Read "checksum" gchar* : Read "colorspace" guint : Read / Write "copyright" gchar* : Read / Write "datetime" gchar* : Read / Write "description" gchar* : Read / Write "file" GFile* : Read / Write "green" GcmColorXYZ* : Read / Write "has-vcgt" gboolean : Read / Write "kind" guint : Read / Write "manufacturer" gchar* : Read / Write "model" gchar* : Read / Write "red" GcmColorXYZ* : Read / Write "size" guint : Read / Write "temperature" guint : Read "white" GcmColorXYZ* : Read / Write
This object is a simple parser for the ICC binary profile data. If only understands a subset of the ICC profile, just enought to get some metadata and the LUT.
struct GcmProfileClass { GObjectClass parent_class; /* padding for future expansion */ void (*_gcm_reserved1) (void); void (*_gcm_reserved2) (void); void (*_gcm_reserved3) (void); void (*_gcm_reserved4) (void); void (*_gcm_reserved5) (void); };
GcmProfile * gcm_profile_new (void
);
Returns : |
a new GcmProfile object. |
Since 2.91.1
gboolean gcm_profile_parse (GcmProfile *profile
,GFile *file
,GError **error
);
Parses a profile file, filling in all the details possible.
|
A valid GcmProfile |
|
A GFile pointing to a profile |
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_profile_parse_data (GcmProfile *profile
,const guint8 *data
,gsize length
,GError **error
);
Parses profile data, filling in all the details possible.
|
A valid GcmProfile |
|
the data to parse |
|
the length of data
|
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_profile_save (GcmProfile *profile
,const gchar *filename
,GError **error
);
Saves the profile data to a file.
|
A valid GcmProfile |
|
the data to parse |
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gpointer gcm_profile_get_handle (GcmProfile *profile
);
Returns : |
Do not call cmsCloseProfile() on this value! |
Since 2.91.1
const gchar * gcm_profile_get_checksum (GcmProfile *profile
);
Since 2.91.1
gboolean gcm_profile_get_can_delete (GcmProfile *profile
);
Since 2.91.1
GcmClut * gcm_profile_generate_vcgt (GcmProfile *profile
,guint size
);
Generates a VCGT table of a specified size.
|
A valid GcmProfile |
|
the size of the table to generate |
Returns : |
A GcmClut object, or NULL . Free with g_object_unref()
|
Since 2.91.1
GcmClut * gcm_profile_generate_curve (GcmProfile *profile
,guint size
);
Generates a curve of a specified size.
|
A valid GcmProfile |
|
the size of the curve to generate |
Returns : |
A GcmClut object, or NULL . Free with g_object_unref()
|
Since 2.91.1
gboolean gcm_profile_set_vcgt_from_data (GcmProfile *profile
,guint16 *red
,guint16 *green
,guint16 *blue
,guint size
,GError **error
);
Sets a VCGT curve of a specified size.
|
A valid GcmProfile |
|
red color data |
|
green color data |
|
blue color data |
|
the size of the color curves. |
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_profile_set_whitepoint (GcmProfile *profile
,const GcmColorXYZ *whitepoint
,GError **error
);
Saves the whitepoint data to a file.
|
A valid GcmProfile |
|
the whitepoint |
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_profile_set_primaries (GcmProfile *profile
,const GcmColorXYZ *red
,const GcmColorXYZ *green
,const GcmColorXYZ *blue
,GError **error
);
Saves the primaries data to a file.
|
A valid GcmProfile |
|
the red primary |
|
the green primary |
|
the blue primary |
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_profile_create_from_chroma (GcmProfile *profile
,gdouble gamma
,const GcmColorYxy *red
,const GcmColorYxy *green
,const GcmColorYxy *blue
,const GcmColorYxy *white
,GError **error
);
Saves the profile data to a file.
|
A valid GcmProfile |
|
primary color data |
|
primary color data |
|
primary color data |
|
whitepoint data |
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
gboolean gcm_profile_guess_and_add_vcgt (GcmProfile *profile
,GError **error
);
Runs a grey image through the profile, to guess semi-correct VCGT curves
|
A valid GcmProfile |
|
A GError, or NULL
|
Returns : |
TRUE for success |
Since 2.91.1
const gchar * gcm_profile_get_description (GcmProfile *profile
);
Gets the profile description.
|
A valid GcmProfile |
Returns : |
The profile description as a string. |
Since 2.91.1
void gcm_profile_set_description (GcmProfile *profile
,const gchar *description
);
Sets the description of the profile.
|
A valid GcmProfile |
|
the data location to read into |
Since 2.91.1
GFile * gcm_profile_get_file (GcmProfile *profile
);
Gets the file attached to this profile.
|
A valid GcmProfile |
Returns : |
A GFile, or NULL . Do not free. |
Since 2.91.1
void gcm_profile_set_file (GcmProfile *profile
,GFile *file
);
Sets the file to be used when reading the profile.
|
A valid GcmProfile |
|
A GFile to read |
Since 2.91.1
const gchar * gcm_profile_get_filename (GcmProfile *profile
);
Gets the filename of the profile data, if one exists.
|
A valid GcmProfile |
Returns : |
A filename, or NULL
|
Since 2.91.1
const gchar * gcm_profile_get_copyright (GcmProfile *profile
);
Gets the copyright string for this profile.
|
A valid GcmProfile |
Returns : |
A string. Do not free. |
Since 2.91.1
void gcm_profile_set_copyright (GcmProfile *profile
,const gchar *copyright
);
Sets the copyright string.
|
A valid GcmProfile |
|
the copyright string |
Since 2.91.1
const gchar * gcm_profile_get_manufacturer (GcmProfile *profile
);
Gets the device manufacturer name.
|
A valid GcmProfile |
Returns : |
A string. Do not free. |
Since 2.91.1
void gcm_profile_set_manufacturer (GcmProfile *profile
,const gchar *manufacturer
);
Sets the device manufacturer name.
|
A valid GcmProfile |
|
the profile manufacturer. |
Since 2.91.1
const gchar * gcm_profile_get_model (GcmProfile *profile
);
Gets the device model name.
|
A valid GcmProfile |
Returns : |
A string. Do not free. |
Since 2.91.1
void gcm_profile_set_model (GcmProfile *profile
,const gchar *model
);
Sets the device model name.
|
A valid GcmProfile |
|
the profile model. |
Since 2.91.1
const gchar * gcm_profile_get_datetime (GcmProfile *profile
);
Gets the profile date and time.
|
A valid GcmProfile |
Returns : |
A string. Do not free. |
Since 2.91.1
void gcm_profile_set_datetime (GcmProfile *profile
,const gchar *datetime
);
Sets the profile date and time.
|
A valid GcmProfile |
|
the profile date time. |
Since 2.91.1
void gcm_profile_set_kind (GcmProfile *profile
,GcmProfileKind kind
);
Since 2.91.1
GcmColorspace gcm_profile_get_colorspace (GcmProfile *profile
);
Since 2.91.1
void gcm_profile_set_colorspace (GcmProfile *profile
,GcmColorspace colorspace
);
Since 2.91.1
gboolean gcm_profile_has_colorspace_description
(GcmProfile *profile
);
Finds out if the profile contains a colorspace description.
|
A valid GcmProfile |
Returns : |
TRUE if the description mentions the profile colorspace explicity,
e.g. "Adobe RGB" for GCM_COLORSPACE_RGB . |
Since 2.91.1
guint gcm_profile_get_temperature (GcmProfile *profile
);
Gets the profile color temperature, rounded to the nearest 100K.
|
A valid GcmProfile |
Returns : |
The color temperature in Kelvins, or 0 for error. |
Since 2.91.1
const GcmColorXYZ * gcm_profile_get_red (GcmProfile *profile
);
Gets the monitor red chromaticity value.
|
a valid GcmProfile instance |
Returns : |
the GcmColorXYZ value |
Since 2.91.1
const GcmColorXYZ * gcm_profile_get_green (GcmProfile *profile
);
Gets the monitor green chromaticity value.
|
a valid GcmProfile instance |
Returns : |
the GcmColorXYZ value |
Since 2.91.1
const GcmColorXYZ * gcm_profile_get_blue (GcmProfile *profile
);
Gets the monitor red chromaticity value.
|
a valid GcmProfile instance |
Returns : |
the GcmColorXYZ value |
Since 2.91.1
const GcmColorXYZ * gcm_profile_get_white (GcmProfile *profile
);
Gets the monitor white chromaticity value.
|
a valid GcmProfile instance |
Returns : |
the GcmColorXYZ value |
Since 2.91.1
const gchar * gcm_profile_get_data (GcmProfile *profile
,const gchar *key
);
Sets an item of data from the profile dictionary, overwriting it if it already exists.
|
A valid GcmProfile |
|
the dictionary key |
Since 2.91.2
void gcm_profile_set_data (GcmProfile *profile
,const gchar *key
,const gchar *data
);