![]() |
![]() |
![]() |
colord Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define CD_IT8_ERROR #define CD_IT8_TYPE_ERROR void (*_cd_it8_reserved1) (void
); void (*_cd_it8_reserved2) (void
); void (*_cd_it8_reserved3) (void
); void (*_cd_it8_reserved4) (void
); void (*_cd_it8_reserved5) (void
); void (*_cd_it8_reserved6) (void
); void (*_cd_it8_reserved7) (void
); void (*_cd_it8_reserved8) (void
); enum CdIt8Error; enum CdIt8Kind; GQuark cd_it8_error_quark (void
); CdIt8 * cd_it8_new (void
); CdIt8 * cd_it8_new_with_kind (CdIt8Kind kind
); gboolean cd_it8_load_from_data (CdIt8 *it8
,const gchar *data
,gsize size
,GError **error
); gboolean cd_it8_load_from_file (CdIt8 *it8
,GFile *file
,GError **error
); gboolean cd_it8_save_to_file (CdIt8 *it8
,GFile *file
,GError **error
); gboolean cd_it8_save_to_data (CdIt8 *it8
,gchar **data
,gsize *size
,GError **error
); void cd_it8_set_kind (CdIt8 *it8
,CdIt8Kind kind
); void cd_it8_set_normalized (CdIt8 *it8
,gboolean normalized
); void cd_it8_set_originator (CdIt8 *it8
,const gchar *originator
); void cd_it8_set_title (CdIt8 *it8
,const gchar *title
); void cd_it8_set_spectral (CdIt8 *it8
,gboolean spectral
); void cd_it8_set_instrument (CdIt8 *it8
,const gchar *instrument
); void cd_it8_set_reference (CdIt8 *it8
,const gchar *reference
); void cd_it8_set_enable_created (CdIt8 *it8
,gboolean enable_created
); void cd_it8_add_data (CdIt8 *it8
,const CdColorRGB *rgb
,const CdColorXYZ *xyz
); void cd_it8_add_option (CdIt8 *it8
,const gchar *option
); void cd_it8_set_matrix (CdIt8 *it8
,const CdMat3x3 *matrix
); const CdMat3x3 * cd_it8_get_matrix (CdIt8 *it8
); CdIt8Kind cd_it8_get_kind (CdIt8 *it8
); gboolean cd_it8_get_normalized (CdIt8 *it8
); const gchar * cd_it8_get_originator (CdIt8 *it8
); const gchar * cd_it8_get_title (CdIt8 *it8
); gboolean cd_it8_get_spectral (CdIt8 *it8
); const gchar * cd_it8_get_instrument (CdIt8 *it8
); const gchar * cd_it8_get_reference (CdIt8 *it8
); gboolean cd_it8_get_enable_created (CdIt8 *it8
); guint cd_it8_get_data_size (CdIt8 *it8
); gboolean cd_it8_get_data_item (CdIt8 *it8
,guint idx
,CdColorRGB *rgb
,CdColorXYZ *xyz
); gboolean cd_it8_has_option (CdIt8 *it8
,const gchar *option
);
This object represents .ti1 and .ti3 files which can contain raw or normalized sample data.
typedef enum { CD_IT8_ERROR_FAILED, CD_IT8_ERROR_LAST } CdIt8Error;
Errors that can be thrown
typedef enum { CD_IT8_KIND_UNKNOWN, CD_IT8_KIND_TI1, CD_IT8_KIND_TI3, CD_IT8_KIND_CCMX, CD_IT8_KIND_CAL, CD_IT8_KIND_LAST } CdIt8Kind;
The kind of IT8 file.
CdIt8 * cd_it8_new (void
);
Creates a new CdIt8 object.
Returns : |
a new CdIt8 object. |
Since 0.1.20
CdIt8 * cd_it8_new_with_kind (CdIt8Kind kind
);
Creates a new CdIt8 object.
|
a CdIt8Kind, e.g CD_IT8_KIND_TI3 . |
Returns : |
a new CdIt8 object. |
Since 0.1.20
gboolean cd_it8_load_from_data (CdIt8 *it8
,const gchar *data
,gsize size
,GError **error
);
Loads a it8 file from data.
|
a CdIt8 instance. |
|
text data |
|
the size of text data |
|
a GError, or NULL
|
Returns : |
TRUE if a valid it8 file was read. |
Since 0.1.20
gboolean cd_it8_load_from_file (CdIt8 *it8
,GFile *file
,GError **error
);
Loads a it8 file from disk.
|
a CdIt8 instance. |
|
a GFile |
|
a GError, or NULL
|
Returns : |
TRUE if a valid it8 file was read. |
Since 0.1.20
gboolean cd_it8_save_to_file (CdIt8 *it8
,GFile *file
,GError **error
);
Saves a it8 file to disk
|
a CdIt8 instance. |
|
a GFile |
|
a GError, or NULL
|
Returns : |
TRUE if it8 file was saved. |
Since 0.1.20
gboolean cd_it8_save_to_data (CdIt8 *it8
,gchar **data
,gsize *size
,GError **error
);
Saves a it8 file to an area of memory.
|
a CdIt8 instance. |
|
a pointer to returned data |
|
size of data
|
|
a GError, or NULL
|
Returns : |
TRUE if it8 file was saved. |
Since 0.1.26
void cd_it8_set_kind (CdIt8 *it8
,CdIt8Kind kind
);
Set the kind of IT8 file.
|
a CdIt8 instance. |
|
a CdIt8Kind, e.g CD_IT8_KIND_TI3 . |
Since 0.1.20
void cd_it8_set_normalized (CdIt8 *it8
,gboolean normalized
);
Sets if normalized data should be written to the .it8 file.
|
a CdIt8 instance. |
|
If the data is normalized |
Since 0.1.20
void cd_it8_set_originator (CdIt8 *it8
,const gchar *originator
);
Sets the program name that created the .it8 file
|
a CdIt8 instance. |
|
the program name, e.g. "gcm-calibrate" |
Since 0.1.20
void cd_it8_set_title (CdIt8 *it8
,const gchar *title
);
Sets the display name for the file.
|
a CdIt8 instance. |
|
the title name, e.g. "Factory calibration" |
Since 0.1.20
void cd_it8_set_spectral (CdIt8 *it8
,gboolean spectral
);
Sets if spectral data should be written to the .it8 file.
|
a CdIt8 instance. |
|
If the data is spectral |
Since 0.1.20
void cd_it8_set_instrument (CdIt8 *it8
,const gchar *instrument
);
Sets the measuring instrument that created the .it8 file
|
a CdIt8 instance. |
|
the instruemnt name, e.g. "huey" |
Since 0.1.20
void cd_it8_set_reference (CdIt8 *it8
,const gchar *reference
);
Sets the reference that as used to create the .it8 reference
|
a CdIt8 instance. |
|
the instruemnt name, e.g. "colormunki" |
Since 0.1.20
void cd_it8_set_enable_created (CdIt8 *it8
,gboolean enable_created
);
Sets if the 'CREATED' attribute should be written. This is mainly useful in the self test programs where we want to string compare the output data with a known reference.
|
a CdIt8 instance. |
|
Is 'CREATED' should be written |
Since 0.1.33
void cd_it8_add_data (CdIt8 *it8
,const CdColorRGB *rgb
,const CdColorXYZ *xyz
);
Adds a reading to this object. If either of rgb
or xyz
is NULL then
a black reading (0.0, 0.0, 0.0) is added instead.
|
a CdIt8 instance. |
|
a CdColorRGB, or NULL
|
|
a CdColorXYZ, or NULL
|
Since 0.1.20
void cd_it8_add_option (CdIt8 *it8
,const gchar *option
);
Sets any extra options that have to be set in the CCMX file
|
a CdIt8 instance. |
|
A IT8 option, e.g. "TYPE_LCD" |
Since 0.1.20
void cd_it8_set_matrix (CdIt8 *it8
,const CdMat3x3 *matrix
);
Set the calibration matrix in the it8 file.
|
a CdIt8 instance. |
|
a CdMat3x3. |
Since 0.1.20
const CdMat3x3 * cd_it8_get_matrix (CdIt8 *it8
);
Gets the calibration matrix in the it8 file.
|
a CdIt8 instance. |
Returns : |
a CdMat3x3. |
Since 0.1.20
CdIt8Kind cd_it8_get_kind (CdIt8 *it8
);
Gets the kind of IT8 file.
|
a CdIt8 instance. |
Returns : |
a CdIt8Kind, e.g CD_IT8_KIND_TI3 . |
Since 0.1.20
gboolean cd_it8_get_normalized (CdIt8 *it8
);
Gets if the data should be written normlaised to y=100.
|
a CdIt8 instance. |
Returns : |
TRUE if the data should be normalised. |
Since 0.1.20
const gchar * cd_it8_get_originator (CdIt8 *it8
);
Gets the file orginator.
|
a CdIt8 instance. |
Returns : |
The originator, or NULL if unset |
Since 0.1.20
const gchar * cd_it8_get_title (CdIt8 *it8
);
Gets the file title.
|
a CdIt8 instance. |
Returns : |
The title, or NULL if unset |
Since 0.1.20
gboolean cd_it8_get_spectral (CdIt8 *it8
);
Gets if the data is spectral or XYZ.
|
a CdIt8 instance. |
Returns : |
TRUE if the data is in spectral bands. |
Since 0.1.20
const gchar * cd_it8_get_instrument (CdIt8 *it8
);
Gets the instrument the file was created by.
|
a CdIt8 instance. |
Returns : |
The instrument, or NULL if unset |
Since 0.1.20
const gchar * cd_it8_get_reference (CdIt8 *it8
);
Gets the reference the file was created against.
|
a CdIt8 instance. |
Returns : |
The reference, or NULL if unset |
Since 0.1.20
gboolean cd_it8_get_enable_created (CdIt8 *it8
);
Gets if the 'CREATED' attribute will be written. This is typically only set in the self test programs.
|
a CdIt8 instance. |
Returns : |
The reference, or NULL if unset |
Since 0.1.33
guint cd_it8_get_data_size (CdIt8 *it8
);
Gets the data size.
|
a CdIt8 instance. |
Returns : |
The number of RGB-XYZ readings in this object. |
Since 0.1.20
gboolean cd_it8_get_data_item (CdIt8 *it8
,guint idx
,CdColorRGB *rgb
,CdColorXYZ *xyz
);
Gets a specific bit of data from this object. The returned data are absolute readings and are not normalised.
|
a CdIt8 instance. |
|
the item index |
|
the returned RGB value |
|
the returned XYZ value |
Returns : |
TRUE if the index existed. |
Since 0.1.20