![]() |
Oyranos Colour Management System API |
|
Data Structures | |
| struct | oyProfile_s |
| a profile and its attributes More... | |
| struct | oyProfiles_s |
| tell about the conversion profiles More... | |
| struct | oyProfileTag_s |
| a profile constituting element More... | |
Typedefs | |
| typedef enum oySIGNATURE_TYPE_e | oySIGNATURE_TYPE_e |
| general profile infosuse for oyProfile_GetSignature | |
| typedef struct oyProfile_s | oyProfile_s |
| a profile and its attributes | |
| typedef struct oyProfiles_s | oyProfiles_s |
| tell about the conversion profiles | |
Enumerations | |
| enum | oySIGNATURE_TYPE_e { oySIGNATURE_COLOUR_SPACE, oySIGNATURE_PCS, oySIGNATURE_SIZE, oySIGNATURE_CMM, oySIGNATURE_VERSION, oySIGNATURE_CLASS, oySIGNATURE_MAGIC, oySIGNATURE_PLATFORM, oySIGNATURE_OPTIONS, oySIGNATURE_MANUFACTURER, oySIGNATURE_MODEL, oySIGNATURE_INTENT, oySIGNATURE_CREATOR, oySIGNATURE_DATETIME_YEAR, oySIGNATURE_DATETIME_MONTH, oySIGNATURE_DATETIME_DAY, oySIGNATURE_DATETIME_HOURS, oySIGNATURE_DATETIME_MINUTES, oySIGNATURE_DATETIME_SECONDS } |
| general profile infosuse for oyProfile_GetSignature More... | |
Functions | |
| oyProfile_s * | oyProfile_s::oyProfile_FromStd (oyPROFILE_e type, oyObject_s object) |
| create from default colour space settings | |
| OYAPI oyProfile_s *OYEXPORT | oyProfile_s::oyProfile_FromFile (const char *name, uint32_t flags, oyObject_s object) |
| create from file | |
| OYAPI oyProfile_s *OYEXPORT | oyProfile_s::oyProfile_FromMem (size_t size, const oyPointer block, uint32_t flags, oyObject_s object) |
| create from in memory blob | |
| OYAPI oyProfile_s *OYEXPORT | oyProfile_s::oyProfile_FromSignature (icSignature sig, oySIGNATURE_TYPE_e type, oyObject_s object) |
| create a fractional profile from signature | |
| OYAPI oyProfile_s *OYEXPORT | oyProfile_s::oyProfile_FromMD5 (uint32_t *md5, oyObject_s object) |
| look up a profile from it's md5 hash sum | |
| OYAPI oyProfile_s *OYEXPORT | oyProfile_s::oyProfile_Copy (oyProfile_s *profile, oyObject_s object) |
| copy from existing profile struct | |
| int | oyProfile_s::oyProfile_Release (oyProfile_s **obj) |
| release correctly | |
| int | oyProfile_s::oyProfile_GetChannelsCount (oyProfile_s *profile) |
| number of channels in a colour space | |
| OYAPI icSignature OYEXPORT | oyProfile_s::oyProfile_GetSignature (oyProfile_s *s, oySIGNATURE_TYPE_e type) |
| get ICC colour space signature | |
| OYAPI int OYEXPORT | oyProfile_s::oyProfile_SetSignature (oyProfile_s *profile, icSignature sig, oySIGNATURE_TYPE_e type) |
| set signature | |
| void | oyProfile_s::oyProfile_SetChannelNames (oyProfile_s *profile, oyObject_s *names_chan) |
| set channel names | |
| const oyChar * | oyProfile_s::oyProfile_GetChannelName (oyProfile_s *profile, int pos, oyNAME_e type) |
| get a channels name | |
| const oyObject_s * | oyProfile_s::oyProfile_GetChannelNames (oyProfile_s *profile) |
| get channel names | |
| OYAPI const oyChar *OYEXPORT | oyProfile_s::oyProfile_GetID (oyProfile_s *s) |
| get unique name | |
| OYAPI const oyChar *OYEXPORT | oyProfile_s::oyProfile_GetText (oyProfile_s *s, oyNAME_e type) |
| get a presentable name | |
| OYAPI oyPointer OYEXPORT | oyProfile_s::oyProfile_GetMem (oyProfile_s *profile, size_t *size, uint32_t flag, oyAlloc_f allocateFunc) |
| get the ICC profile in memory | |
| int | oyProfile_s::oyProfile_GetMD5 (oyProfile_s *profile, int flags, uint32_t *md5) |
| get the ICC profile md5 hash sum | |
| const char * | oyProfile_s::oyProfile_GetFileName (oyProfile_s *profile, int dl_pos) |
| get the ICC profile location in the filesystem | |
| int | oyProfile_s::oyProfile_DeviceAdd (oyProfile_s *profile, oyConfig_s *device, oyOptions_s *options) |
| add device and driver informations to a profile | |
| int | oyProfile_s::oyProfile_DeviceGet (oyProfile_s *profile, oyConfig_s *device) |
| obtain device informations from a profile | |
| oyProfileTag_s * | oyProfile_s::oyProfile_GetTagById (oyProfile_s *profile, icTagSignature id) |
| get a profile tag by its tag signature | |
| oyProfileTag_s * | oyProfile_s::oyProfile_GetTagByPos (oyProfile_s *profile, int pos) |
| get a profile tag | |
| int | oyProfile_s::oyProfile_GetTagCount_ (oyProfile_s *profile) |
| int | oyProfile_s::oyProfile_GetTagCount (oyProfile_s *profile) |
| int | oyProfile_s::oyProfile_TagMoveIn (oyProfile_s *profile, oyProfileTag_s **obj, int pos) |
| add a tag to a profile | |
| int | oyProfile_s::oyProfile_TagReleaseAt (oyProfile_s *profile, int pos) |
| remove a tag from a profile | |
| int | oyProfile_s::oyProfile_AddTagText (oyProfile_s *profile, icSignature signature, const char *text) |
| add a text tag | |
| OYAPI oyProfileTag_s *OYEXPORT | oyProfileTag_s::oyProfileTag_New (oyObject_s object) |
| OYAPI oyProfileTag_s *OYEXPORT | oyProfileTag_s::oyProfileTag_Create (oyStructList_s *list, icTagTypeSignature tag_type, uint32_t version, const char *required_cmm, oyObject_s object) |
| OYAPI oyProfileTag_s *OYEXPORT | oyProfileTag_s::oyProfileTag_CreateFromText (const char *text, icTagTypeSignature tag_type, icTagSignature tag_usage, oyObject_s object) |
| OYAPI oyProfileTag_s *OYEXPORT | oyProfileTag_s::oyProfileTag_CreateFromData (icTagSignature sig, icTagTypeSignature type, oySTATUS_e status, size_t tag_size, oyPointer tag_block, oyObject_s object) |
| OYAPI oyProfileTag_s *OYEXPORT | oyProfileTag_s::oyProfileTag_Copy (oyProfileTag_s *obj, oyObject_s object) |
| OYAPI int OYEXPORT | oyProfileTag_s::oyProfileTag_Release (oyProfileTag_s **obj) |
| OYAPI int OYEXPORT | oyProfileTag_s::oyProfileTag_Set (oyProfileTag_s *tag, icTagSignature sig, icTagTypeSignature type, oySTATUS_e status, size_t tag_size, oyPointer tag_block) |
| oyStructList_s * | oyProfileTag_s::oyProfileTag_Get (oyProfileTag_s *tag) |
| char ** | oyProfileTag_s::oyProfileTag_GetText (oyProfileTag_s *tag, int32_t *n, const char *language, const char *country, int32_t *tag_size, oyAlloc_f allocateFunc) |
| int | oyProfileTag_s::oyProfileTag_GetBlock (oyProfileTag_s *tag, oyPointer *tag_block, size_t *tag_size, oyAlloc_f allocateFunc) |
| OYAPI oyProfiles_s *OYEXPORT | oyProfiles_s::oyProfiles_New (oyObject_s object) |
| OYAPI oyProfiles_s *OYEXPORT | oyProfiles_s::oyProfiles_Create (oyProfiles_s *patterns, oyObject_s object) |
| get a list of installed profiles | |
| OYAPI oyProfiles_s *OYEXPORT | oyProfiles_s::oyProfiles_ForStd (oyPROFILE_e std_profile_class, int *current, oyObject_s object) |
| get a list of installed profiles | |
| OYAPI int OYEXPORT | oyProfiles_s::oyProfiles_Release (oyProfiles_s **obj) |
| oyProfiles_s * | oyProfiles_s::oyProfiles_MoveIn (oyProfiles_s *list, oyProfile_s **obj, int pos) |
| int | oyProfiles_s::oyProfiles_ReleaseAt (oyProfiles_s *list, int pos) |
| oyProfile_s * | oyProfiles_s::oyProfiles_Get (oyProfiles_s *list, int pos) |
| int | oyProfiles_s::oyProfiles_Count (oyProfiles_s *list) |
| int | oyProfiles_s::oyProfiles_DeviceRank (oyProfiles_s *list, oyConfig_s *device, int32_t *rank_list) |
| sort a profile list according to a given device | |
To open a profile exist several methods in the oyProfile_Fromxxx APIs. oyProfile_FromStd(), oyProfile_FromFile() and oyProfile_FromMem() are basic profile open functions. oyProfile_FromSignature() is used for creating a dummy profile during profile filtering. oyProfile_FromMD5() is a lookup function from a profile hash, e.g. as provided by a 'psid' tag.
Profile properties can be obtained from oyProfile_GetSignature(), like colour spaces, date, magic number and so on. oyProfile_GetChannelNames(), oyProfile_GetText() and oyProfile_GetID() provide additional informations.
The profile element functions have Tag in their names. They work together with the oyProfileTag_s APIs.
oyProfile_GetFileName is a reverse lookup to obtain the name of a installed file from a profile, e.g. find the name of a reachable display profile.
| typedef struct oyProfile_s oyProfile_s |
a profile and its attributes
| typedef struct oyProfiles_s oyProfiles_s |
tell about the conversion profiles
| typedef enum oySIGNATURE_TYPE_e oySIGNATURE_TYPE_e |
general profile infosuse for oyProfile_GetSignature
| enum oySIGNATURE_TYPE_e |
general profile infosuse for oyProfile_GetSignature
| int oyProfile_AddTagText | ( | oyProfile_s * | profile, |
| icSignature | signature, | ||
| const char * | text | ||
| ) |
add a text tag
Function oyProfile_AddTagText
References oyProfile_s::oyProfile_GetSignature(), oyProfile_s::oyProfile_TagMoveIn(), oyProfileTag_s::oyProfileTag_Create(), oySIGNATURE_VERSION, and oyProfileTag_s::use.
Referenced by oyProfile_s::oyProfile_DeviceAdd().
| OYAPI oyProfile_s *OYEXPORT oyProfile_Copy | ( | oyProfile_s * | profile, |
| oyObject_s | object | ||
| ) |
copy from existing profile struct
| [in] | profile | other profile |
| [in] | object | the optional base |
Referenced by oyImage_s::oyImage_Create(), oyImage_s::oyImage_ProfileGet(), oyImage_s::oyImage_SetCritical(), oyProfile_s::oyProfile_FromStd(), and oyProfiles_s::oyProfiles_Get().
| int oyProfile_DeviceAdd | ( | oyProfile_s * | profile, |
| oyConfig_s * | device, | ||
| oyOptions_s * | options | ||
| ) |
add device and driver informations to a profile
Function oyProfile_DeviceAdd
oyProfile_DeviceAdd() is for storing device/driver informations in a ICC profile. So the profile can be sent over internet and Oyranos, or an other CMS, can better match to a device/driver on the new host. The convention what to place into the ICC profile is dependent on each device class and its actual driver or driver type. The meta data is stored in the ICC 'meta' tag of type 'dict'.
| [in,out] | profile | the profile |
| [in] | device | device and driver informations |
| [in] | options | - "key_prefix_required" : prefix accept only key names with the prefix Separation by point '.' is allowed.
|
References oyConfig_s::oyConfig_Count(), oyConfig_s::oyConfig_FindString(), oyConfig_s::oyConfig_Get(), oyFilterRegistrationToText(), oyProfile_s::oyProfile_AddTagText(), oyProfile_s::oyProfile_GetMem(), oyProfile_s::oyProfile_GetTagByPos(), oyProfile_s::oyProfile_TagMoveIn(), oyProfileTag_s::oyProfileTag_New(), and oyProfileTag_s::oyProfileTag_Set().
| int oyProfile_DeviceGet | ( | oyProfile_s * | profile, |
| oyConfig_s * | device | ||
| ) |
obtain device informations from a profile
Function oyProfile_DeviceGet
oyConfig_s * device = oyConfig_New( "//" OY_TYPE_STD "/config", object );
oyProfile_DeviceGet( profile, device ); | [in] | profile | the profile |
| [in,out] | device | the device description |
References oyConfig_s::backend_core, oyProfile_s::oyProfile_GetTagById(), oyProfileTag_s::oyProfileTag_GetText(), and oyConfig_s::registration.
Referenced by oyProfiles_s::oyProfiles_DeviceRank().
| OYAPI oyProfile_s *OYEXPORT oyProfile_FromFile | ( | const char * | name, |
| uint32_t | flags, | ||
| oyObject_s | object | ||
| ) |
create from file
Supported are profiles with absolute path names, profiles in OpenICC profile paths and profiles relative to the current working path. Search will occure in this order.
| [in] | name | profile file name |
| [in] | flags | for future extension |
| [in] | object | the optional base |
flags supports OY_NO_CACHE_READ and OY_NO_CACHE_WRITE to disable cache reading and writing. The cache flags are useful for one time profiles or scanning large numbers of profiles.
References oyProfile_s::oyProfile_GetID().
Referenced by oyDeviceAskProfile2(), oyDeviceSetProfile(), oyDeviceSetup(), oyImage_s::oyImage_CreateForDisplay(), oyProfile_s::oyProfile_FromMD5(), oyProfile_s::oyProfile_GetFileName(), and oyProfiles_s::oyProfiles_Create().
| OYAPI oyProfile_s *OYEXPORT oyProfile_FromMD5 | ( | uint32_t * | md5, |
| oyObject_s | object | ||
| ) |
look up a profile from it's md5 hash sum
| [in] | md5 | hash sum |
| [in] | object | the optional base |
References oyProfile_s::oyProfile_FromFile(), and oyProfile_s::oyProfile_Release().
| OYAPI oyProfile_s *OYEXPORT oyProfile_FromMem | ( | size_t | size, |
| const oyPointer | block, | ||
| uint32_t | flags, | ||
| oyObject_s | object | ||
| ) |
create from in memory blob
| [in] | size | buffer size |
| [in] | block | pointer to memory containing a profile |
| [in] | flags | for future use |
| [in] | object | the optional base |
References oyProfile_s::oyProfile_GetID().
| OYAPI oyProfile_s *OYEXPORT oyProfile_FromSignature | ( | icSignature | sig, |
| oySIGNATURE_TYPE_e | type, | ||
| oyObject_s | object | ||
| ) |
create a fractional profile from signature
| [in] | sig | signature |
| [in] | type | type of signature to set |
| [in] | object | the optional base |
References oyProfile_s::oyProfile_SetSignature().
Referenced by oyDeviceSetup(), and oyProfiles_s::oyProfiles_ForStd().
| oyProfile_s * oyProfile_FromStd | ( | oyPROFILE_e | type, |
| oyObject_s | object | ||
| ) |
create from default colour space settings
| [in] | type | default colour space |
| [in] | object | the optional base |
References oyDEFAULT_PROFILE_END, oyGetDefaultProfileName(), oyProfile_s::oyProfile_Copy(), and oyProfile_s::oyProfile_GetID().
Referenced by oyDeviceGetProfile(), and oyProfiles_s::oyProfiles_ForStd().
| const oyChar * oyProfile_GetChannelName | ( | oyProfile_s * | profile, |
| int | pos, | ||
| oyNAME_e | type | ||
| ) |
get a channels name
A convinience function to get a single name with a certain type.
| [in] | profile | address of a Oyranos named colour structure |
| [in] | pos | position of channel |
| [in] | type | sort of text |
References oyProfile_s::oyProfile_GetChannelNames(), and oyProfile_s::oyProfile_GetChannelsCount().
| const oyObject_s * oyProfile_GetChannelNames | ( | oyProfile_s * | profile | ) |
get channel names
| [in] | profile | the profile |
References oyICCColourSpaceGetChannelName(), oyProfile_s::oyProfile_GetChannelsCount(), and oyProfile_s::oyProfile_GetSignature().
Referenced by oyProfile_s::oyProfile_GetChannelName().
| int oyProfile_GetChannelsCount | ( | oyProfile_s * | profile | ) |
number of channels in a colour space
References oyICCColourSpaceGetChannelCount().
Referenced by oyDumpColourToCGATS(), oyFilterPlug_s::oyFilterPlug_ResolveImage(), oyProfile_s::oyProfile_GetChannelName(), oyProfile_s::oyProfile_GetChannelNames(), and oyProfile_s::oyProfile_SetChannelNames().
| const char * oyProfile_GetFileName | ( | oyProfile_s * | profile, |
| int | dl_pos | ||
| ) |
get the ICC profile location in the filesystem
Function oyProfile_GetFileName
This function tries to find a profile on disk matching a possibly memory only profile. In case the profile was previously opened from file or as a from Oyranos defaults the associated filename will simply be retuned.
| profile | the profile |
| dl_pos | -1, or the position in a device links source chain |
References oyProfile_s::oyProfile_FromFile(), oyProfile_s::oyProfile_GetTagById(), oyProfile_s::oyProfile_Release(), and oyProfileTag_s::oyProfileTag_GetText().
Referenced by oyDeviceSetup(), oyProfiles_s::oyProfiles_DeviceRank(), and oyProfiles_s::oyProfiles_ForStd().
| OYAPI const oyChar *OYEXPORT oyProfile_GetID | ( | oyProfile_s * | s | ) |
get unique name
the returned string is identical to oyNAME_ID
Referenced by oyProfile_s::oyProfile_FromFile(), oyProfile_s::oyProfile_FromMem(), oyProfile_s::oyProfile_FromStd(), and oyProfile_s::oyProfile_GetText().
| int oyProfile_GetMD5 | ( | oyProfile_s * | profile, |
| int | flags, | ||
| uint32_t * | md5 | ||
| ) |
get the ICC profile md5 hash sum
Function oyProfile_GetMD5
The ICC profiles ID is returned. On request it can be recomputed through the OY_COMPUTE flag. That computed ID will be used internally as a hash value. The original profile ID can always be obtained through the OY_FROM_PROFILE flags until writing of the profile.
| [in,out] | profile | the profile |
| [in] | flags | OY_COMPUTE will calculate the hash OY_FROM_PROFILE - original profile ID |
| [out] | md5 | the the ICC md5 based profile ID |
Referenced by oyProfile_s::oyProfile_GetMem().
| OYAPI oyPointer OYEXPORT oyProfile_GetMem | ( | oyProfile_s * | profile, |
| size_t * | size, | ||
| uint32_t | flag, | ||
| oyAlloc_f | allocateFunc | ||
| ) |
get the ICC profile in memory
Function oyProfile_GetMem
The prefered memory comes from the unmodified original memory. Otherwise a previously modified tag list is serialised into memory.
References oyProfile_s::oyProfile_GetMD5(), and oyProfile_s::oyProfile_GetText().
Referenced by oyDeviceSetup(), and oyProfile_s::oyProfile_DeviceAdd().
| OYAPI icSignature OYEXPORT oyProfile_GetSignature | ( | oyProfile_s * | s, |
| oySIGNATURE_TYPE_e | type | ||
| ) |
get ICC colour space signature
// show some profile properties
oyProfile_s * p = ...; // get from somewhere
icSignature vs = oyValueUInt32( oyProfile_GetSignature(p,oySIGNATURE_VERSION) );
char * v = (char*)&vs;
printf(" created %d.%d.%d %d:%d:%d\n",
oyProfile_GetSignature(p,oySIGNATURE_DATETIME_YEAR),
oyProfile_GetSignature(p,oySIGNATURE_DATETIME_MONTH),
oyProfile_GetSignature(p,oySIGNATURE_DATETIME_DAY),
oyProfile_GetSignature(p,oySIGNATURE_DATETIME_HOURS),
oyProfile_GetSignature(p,oySIGNATURE_DATETIME_MINUTES),
oyProfile_GetSignature(p,oySIGNATURE_DATETIME_SECONDS)
);
printf(" pcs: %s colour space: %s version: %d.%d.%d\n",
oyICCColourSpaceGetName( (icColorSpaceSignature)
oyProfile_GetSignature(p,oySIGNATURE_PCS) ),
oyICCColourSpaceGetName( (icColorSpaceSignature)
oyProfile_GetSignature(p,oySIGNATURE_COLOUR_SPACE) ),
(int)v[0], (int)v[1]/16, (int)v[1]%16
);
References oySIGNATURE_CLASS, oySIGNATURE_CMM, oySIGNATURE_CREATOR, oySIGNATURE_DATETIME_DAY, oySIGNATURE_DATETIME_HOURS, oySIGNATURE_DATETIME_MINUTES, oySIGNATURE_DATETIME_MONTH, oySIGNATURE_DATETIME_SECONDS, oySIGNATURE_DATETIME_YEAR, oySIGNATURE_INTENT, oySIGNATURE_MAGIC, oySIGNATURE_MANUFACTURER, oySIGNATURE_MODEL, oySIGNATURE_OPTIONS, oySIGNATURE_PCS, oySIGNATURE_PLATFORM, oySIGNATURE_SIZE, oySIGNATURE_VERSION, and oyValueUInt16().
Referenced by oyCopyColour(), oyDeviceAskProfile2(), oyDeviceSetup(), oyDumpColourToCGATS(), oyProfile_s::oyProfile_AddTagText(), and oyProfile_s::oyProfile_GetChannelNames().
| oyProfileTag_s * oyProfile_GetTagById | ( | oyProfile_s * | profile, |
| icTagSignature | id | ||
| ) |
get a profile tag by its tag signature
Function oyProfile_GetTagById
| [in] | profile | the profile |
| [in] | id | icTagSignature |
References oyProfile_s::oyProfile_GetTagCount_(), and oyProfileTag_s::oyProfileTag_Release().
Referenced by oyProfile_s::oyProfile_DeviceGet(), oyProfile_s::oyProfile_GetFileName(), and oyProfile_s::oyProfile_GetText().
| oyProfileTag_s * oyProfile_GetTagByPos | ( | oyProfile_s * | profile, |
| int | pos | ||
| ) |
get a profile tag
Function oyProfile_GetTagByPos
| [in] | profile | the profile |
| [in] | pos | header + tag position |
Referenced by oyProfile_s::oyProfile_DeviceAdd().
| int oyProfile_GetTagCount | ( | oyProfile_s * | profile | ) |
Function oyProfile_GetTagCount
References oyProfileTag_s::oyProfileTag_Release().
| int oyProfile_GetTagCount_ | ( | oyProfile_s * | profile | ) |
|internal Function oyProfile_GetTagCount_
non thread save
References oyProfileTag_s::oyProfileTag_Release().
Referenced by oyProfile_s::oyProfile_GetTagById(), and oyProfile_s::oyProfile_TagMoveIn().
| OYAPI const oyChar *OYEXPORT oyProfile_GetText | ( | oyProfile_s * | s, |
| oyNAME_e | type | ||
| ) |
get a presentable name
The type argument should select the following string in return:
References oyProfile_s::oyProfile_GetID(), oyProfile_s::oyProfile_GetTagById(), oyProfileTag_s::oyProfileTag_GetText(), and oyWidgetTitleGet().
Referenced by oyDeviceSetup(), oyFilterCore_s::oyFilterCore_GetText(), and oyProfile_s::oyProfile_GetMem().
| int oyProfile_Release | ( | oyProfile_s ** | obj | ) |
release correctly
set pointer to zero
| [in] | obj | address of Oyranos struct pointer |
Referenced by oyDeviceSetup(), oyImage_s::oyImage_CreateForDisplay(), oyImage_s::oyImage_Release(), oyImage_s::oyImage_SetCritical(), oyProfile_s::oyProfile_FromMD5(), oyProfile_s::oyProfile_GetFileName(), oyProfiles_s::oyProfiles_Create(), oyProfiles_s::oyProfiles_DeviceRank(), and oyProfiles_s::oyProfiles_ForStd().
| void oyProfile_SetChannelNames | ( | oyProfile_s * | profile, |
| oyObject_s * | names_chan | ||
| ) |
set channel names
The function should be used to specify extra channels or unusual colour layouts like CMYKRB. The number of elements in names_chan should fit to the channels count or to the colour space signature.
You can let single entries empty if they are understandable by the colour space signature. Oyranos will set them for you on request.
| [in] | profile | profile |
| [in] | names_chan | pointer to channel names |
References oyProfile_s::oyProfile_GetChannelsCount().
| OYAPI int OYEXPORT oyProfile_SetSignature | ( | oyProfile_s * | profile, |
| icSignature | sig, | ||
| oySIGNATURE_TYPE_e | type | ||
| ) |
set signature
| [in] | profile | the profile |
| [in] | sig | signature |
| [in] | type | type of signature to set |
References oySIGNATURE_CLASS, oySIGNATURE_CMM, oySIGNATURE_CREATOR, oySIGNATURE_DATETIME_DAY, oySIGNATURE_DATETIME_HOURS, oySIGNATURE_DATETIME_MINUTES, oySIGNATURE_DATETIME_MONTH, oySIGNATURE_DATETIME_SECONDS, oySIGNATURE_DATETIME_YEAR, oySIGNATURE_INTENT, oySIGNATURE_MAGIC, oySIGNATURE_MANUFACTURER, oySIGNATURE_MODEL, oySIGNATURE_OPTIONS, oySIGNATURE_PCS, oySIGNATURE_PLATFORM, oySIGNATURE_SIZE, oySIGNATURE_VERSION, and oyValueUInt16().
Referenced by oyProfile_s::oyProfile_FromSignature(), and oyProfiles_s::oyProfiles_ForStd().
| int oyProfile_TagMoveIn | ( | oyProfile_s * | profile, |
| oyProfileTag_s ** | obj, | ||
| int | pos | ||
| ) |
add a tag to a profile
Function oyProfile_TagMoveIn
Initialise tag list.
Avoid double occurencies of tags.
References oyProfile_s::oyProfile_GetTagCount_(), oyProfileTag_s::oyProfileTag_Release(), and oyProfileTag_s::use.
Referenced by oyProfile_s::oyProfile_AddTagText(), and oyProfile_s::oyProfile_DeviceAdd().
| int oyProfile_TagReleaseAt | ( | oyProfile_s * | profile, |
| int | pos | ||
| ) |
remove a tag from a profile
Function oyProfile_TagReleaseAt
| int oyProfiles_Count | ( | oyProfiles_s * | list | ) |
Referenced by oyDeviceSetup(), oyFilterCore_s::oyFilterCore_GetText(), oyProfiles_s::oyProfiles_Create(), oyProfiles_s::oyProfiles_DeviceRank(), and oyProfiles_s::oyProfiles_ForStd().
| OYAPI oyProfiles_s *OYEXPORT oyProfiles_Create | ( | oyProfiles_s * | patterns, |
| oyObject_s | object | ||
| ) |
get a list of installed profiles
Function oyProfiles_Create
| [in] | patterns | a list properties, e.g. classes |
| object | the optional object |
References oyProfile_s::oyProfile_FromFile(), oyProfile_s::oyProfile_Release(), oyProfiles_s::oyProfiles_Count(), oyProfiles_s::oyProfiles_Get(), oyProfiles_s::oyProfiles_MoveIn(), and oyProfiles_s::oyProfiles_New().
Referenced by oyDeviceSetup(), and oyProfiles_s::oyProfiles_ForStd().
| int oyProfiles_DeviceRank | ( | oyProfiles_s * | list, |
| oyConfig_s * | device, | ||
| int32_t * | rank_list | ||
| ) |
sort a profile list according to a given device
Function oyProfiles_DeviceRank
Profiles which match the device will placed according to a rank value on top of the list followed by the zero ranked profiles.
oyProfiles_s * p_list = oyProfiles_ForStd( oyASSUMED_RGB, 0,0 );
int32_t * rank_list = (int32_t*) malloc( oyProfiles_Count(p_list) *
sizeof(int32_t) );
oyProfiles_DeviceRank( p_list, oy_device, rank_list );
n = oyProfiles_Count( p_list );
for(i = 0; i < n; ++i)
{
temp_prof = oyProfiles_Get( p_list, i );
printf("%d %d: \"%s\" %s\n", rank_list[i], i,
oyProfile_GetText( temp_prof, oyNAME_DESCRIPTION ),
oyProfile_GetFileName(temp_prof, 0));
oyProfile_Release( &temp_prof );
} | [in,out] | list | the to be sorted profile list |
| [in] | device | filter pattern |
| [in,out] | rank_list | list of rank levels for the profile list |
References oyConfig_s::backend_core, oyConfig_s::db, oyConfig_s::oyConfig_Compare(), oyConfig_s::oyConfig_FindString(), oyConfig_s::oyConfig_New(), oyProfile_s::oyProfile_DeviceGet(), oyProfile_s::oyProfile_GetFileName(), oyProfile_s::oyProfile_Release(), oyProfiles_s::oyProfiles_Count(), oyProfiles_s::oyProfiles_Get(), and oyConfig_s::registration.
Referenced by oyDeviceSetup().
| OYAPI oyProfiles_s *OYEXPORT oyProfiles_ForStd | ( | oyPROFILE_e | std_profile_class, |
| int * | current, | ||
| oyObject_s | object | ||
| ) |
get a list of installed profiles
Function oyProfiles_ForStd
Allow for a special case with oyDEFAULT_PROFILE_START in the colour_space argument, to select all possible standard colour profiles, e.g. for typical colour conversions.
oyASSUMED_WEB will result in exactly one profile added as long as it is available in the file paths.
| [in] | std_profile_class | standard profile class, e.g. oyEDITING_RGB |
| [out] | current | get the colour_space profile position |
| object | a optional object |
oyPROFILE_e type = oyEDITING_RGB;
int current = 0,
size, i;
oyProfile_s * temp_prof = 0;
oyProfiles_s * iccs = 0;
iccs = oyProfiles_ForStd( type, ¤t, 0 );
size = oyProfiles_Count(iccs);
for( i = 0; i < size; ++i)
{
temp_prof = oyProfiles_Get( iccs, i );
printf("%s %d: \"%s\" %s\n", i == current ? "*":" ", i,
oyProfile_GetText( temp_prof, oyNAME_DESCRIPTION ),
oyProfile_GetFileName(temp_prof, -1));
oyProfile_Release( &temp_prof );
} References oyASSUMED_CMYK, oyASSUMED_GRAY, oyASSUMED_LAB, oyASSUMED_RGB, oyASSUMED_WEB, oyASSUMED_XYZ, oyEDITING_CMYK, oyEDITING_GRAY, oyEDITING_LAB, oyEDITING_RGB, oyEDITING_XYZ, oyGetDefaultProfileName(), oyProfile_s::oyProfile_FromSignature(), oyProfile_s::oyProfile_FromStd(), oyProfile_s::oyProfile_GetFileName(), oyPROFILE_PROOF, oyProfile_s::oyProfile_Release(), oyProfile_s::oyProfile_SetSignature(), oyProfiles_s::oyProfiles_Count(), oyProfiles_s::oyProfiles_Create(), oyProfiles_s::oyProfiles_Get(), oyProfiles_s::oyProfiles_MoveIn(), oyProfiles_s::oyProfiles_New(), oyProfiles_s::oyProfiles_Release(), and oySIGNATURE_CLASS.
| oyProfile_s * oyProfiles_Get | ( | oyProfiles_s * | list, |
| int | pos | ||
| ) |
| [in] | list | the profile list to use |
| [in] | pos | the position in list |
References oyProfile_s::oyProfile_Copy().
Referenced by oyDeviceSetup(), oyFilterCore_s::oyFilterCore_GetText(), oyProfiles_s::oyProfiles_Create(), oyProfiles_s::oyProfiles_DeviceRank(), and oyProfiles_s::oyProfiles_ForStd().
| oyProfiles_s * oyProfiles_MoveIn | ( | oyProfiles_s * | list, |
| oyProfile_s ** | obj, | ||
| int | pos | ||
| ) |
References oyProfiles_s::oyProfiles_New().
Referenced by oyDeviceSetup(), oyProfiles_s::oyProfiles_Create(), and oyProfiles_s::oyProfiles_ForStd().
| OYAPI oyProfiles_s *OYEXPORT oyProfiles_New | ( | oyObject_s | object | ) |
References oyProfiles_s::oyProfiles_Release(), and oyProfiles_s::release.
Referenced by oyProfiles_s::oyProfiles_Create(), oyProfiles_s::oyProfiles_ForStd(), and oyProfiles_s::oyProfiles_MoveIn().
| OYAPI int OYEXPORT oyProfiles_Release | ( | oyProfiles_s ** | obj | ) |
Referenced by oyDeviceSetup(), oyProfiles_s::oyProfiles_ForStd(), and oyProfiles_s::oyProfiles_New().
| int oyProfiles_ReleaseAt | ( | oyProfiles_s * | list, |
| int | pos | ||
| ) |
| OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Copy | ( | oyProfileTag_s * | obj, |
| oyObject_s | object | ||
| ) |
Function oyProfileTag_Copy
Referenced by oyProfileTag_s::oyProfileTag_New().
| OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Create | ( | oyStructList_s * | list, |
| icTagTypeSignature | tag_type, | ||
| uint32_t | version, | ||
| const char * | required_cmm, | ||
| oyObject_s | object | ||
| ) |
Function oyProfileTag_Create
The API relies on an generic arguments inside a list. The arguments are not specified here but in the appropriate moduls. This allowes flixibility, which needs more understanding.
For the effect of the parameters look at the appropriate module documentation and the function infos.
| [in] | list | a list of arguments |
| [in] | tag_type | type to create |
| [in] | version | version as supported |
| [in,out] | required_cmm | in: CMM to create the tag; out: used CMM |
| [in] | object | the user object for the tag creation |
References oyProfileTag_s::last_cmm_, oyCMMapi3_s::oyCMMProfileTag_Create, oyProfileTag_s::oyProfileTag_New(), and oyQUERY_PROFILE_TAG_TYPE_WRITE.
Referenced by oyProfile_s::oyProfile_AddTagText(), and oyProfileTag_s::oyProfileTag_CreateFromText().
| OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_CreateFromData | ( | icTagSignature | sig, |
| icTagTypeSignature | type, | ||
| oySTATUS_e | status, | ||
| size_t | tag_size, | ||
| oyPointer | tag_block, | ||
| oyObject_s | object | ||
| ) |
Function oyProfileTag_CreateFromData
| [in] | sig | usage signature |
| [in] | type | content type |
| [in] | status | to be set |
| [in] | tag_size | memory size of tag_block |
| [in] | tag_block | the to be copied memory |
| [in] | object | the user object for the tag creation |
References oyProfileTag_s::oyProfileTag_New(), and oyProfileTag_s::use.
| OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_CreateFromText | ( | const char * | text, |
| icTagTypeSignature | tag_type, | ||
| icTagSignature | tag_usage, | ||
| oyObject_s | object | ||
| ) |
Function oyProfileTag_CreateFromText
| [in] | text | a string |
| [in] | tag_type | type to create, e.g. icSigTextDescriptionType or icSigTextType |
| [in] | tag_usage | signature, e.g. icSigCopyrightTag |
| [in] | object | the user object for the tag creation |
References oyProfileTag_s::oyProfileTag_Create(), and oyProfileTag_s::use.
| oyStructList_s * oyProfileTag_Get | ( | oyProfileTag_s * | tag | ) |
Function oyProfileTag_Get
Hint: to select a certain module use the oyProfileTag_s::required_cmm element from the tag parameter.
| [in] | tag | the tag to read |
References oyProfileTag_s::last_cmm_, oyCMMapi3_s::oyCMMProfileTag_GetValues, oyQUERY_PROFILE_TAG_TYPE_READ, and oyProfileTag_s::required_cmm.
Referenced by oyProfileTag_s::oyProfileTag_GetText().
| int oyProfileTag_GetBlock | ( | oyProfileTag_s * | tag, |
| oyPointer * | tag_block, | ||
| size_t * | tag_size, | ||
| oyAlloc_f | allocateFunc | ||
| ) |
Function oyProfileTag_GetBlock
Get the raw memory block of the tag.
| [in] | tag | the tag to read |
| [out] | tag_block | the raw data owned by the user; on success the block if it has a size; else undefined |
| [out] | tag_size | the data size; mandatory arg; on success the size returned in tag_block else undefined |
| [in] | allocateFunc | the user allocator |
| char ** oyProfileTag_GetText | ( | oyProfileTag_s * | tag, |
| int32_t * | n, | ||
| const char * | language, | ||
| const char * | country, | ||
| int32_t * | tag_size, | ||
| oyAlloc_f | allocateFunc | ||
| ) |
Function oyProfileTag_GetText
For the effect of the parameters look at the appropriate module.
Hint: to select a certain module use the oyProfileTag_s::required_cmm element from the tag parameter.
For localised strings, e.g. icSigMultiLocalizedUnicodeType:
| [in] | tag | the tag to read |
| [out] | n | the number of returned strings |
| [in] | language | 2 byte language code, or "" for current |
| [in] | country | 2 byte country code |
| [out] | tag_size | the processed tag size |
| [in] | allocateFunc | the user allocator for the returned list |
References oyCountry(), oyLanguage(), and oyProfileTag_s::oyProfileTag_Get().
Referenced by oyProfile_s::oyProfile_DeviceGet(), oyProfile_s::oyProfile_GetFileName(), and oyProfile_s::oyProfile_GetText().
| OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_New | ( | oyObject_s | object | ) |
Function oyProfileTag_New
References oyProfileTag_s::oyProfileTag_Copy(), oyProfileTag_s::oyProfileTag_Release(), and oyProfileTag_s::release.
Referenced by oyProfile_s::oyProfile_DeviceAdd(), oyProfileTag_s::oyProfileTag_Create(), and oyProfileTag_s::oyProfileTag_CreateFromData().
| OYAPI int OYEXPORT oyProfileTag_Release | ( | oyProfileTag_s ** | obj | ) |
Function oyProfileTag_Release
Referenced by oyProfile_s::oyProfile_GetTagById(), oyProfile_s::oyProfile_GetTagCount(), oyProfile_s::oyProfile_GetTagCount_(), oyProfile_s::oyProfile_TagMoveIn(), and oyProfileTag_s::oyProfileTag_New().
| OYAPI int OYEXPORT oyProfileTag_Set | ( | oyProfileTag_s * | tag, |
| icTagSignature | sig, | ||
| icTagTypeSignature | type, | ||
| oySTATUS_e | status, | ||
| size_t | tag_size, | ||
| oyPointer | tag_block | ||
| ) |
Function oyProfileTag_Set
The function is a simple setter for the object elements.
| [in,out] | tag | the to be manipulated ICC profile object |
| [in] | sig | usage signature |
| [in] | type | content type |
| [in] | status | to be set |
| [in] | tag_size | memory size of tag_block |
| [in] | tag_block | the block to be moved into the object; The pointer is owned by the object. Its memory should be allocated as with the same allocators as the object. |
References oyProfileTag_s::use.
Referenced by oyProfile_s::oyProfile_DeviceAdd().