Oyranos Colour Management System API
Data Structures | Typedefs | Enumerations | Functions
Profile API
Alpha API's
Collaboration diagram for Profile 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_soyProfile_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_soyProfile_s::oyProfile_GetTagById (oyProfile_s *profile, icTagSignature id)
 get a profile tag by its tag signature
oyProfileTag_soyProfile_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_soyProfiles_s::oyProfiles_MoveIn (oyProfiles_s *list, oyProfile_s **obj, int pos)
int oyProfiles_s::oyProfiles_ReleaseAt (oyProfiles_s *list, int pos)
oyProfile_soyProfiles_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

Detailed Description

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 Documentation

typedef struct oyProfile_s oyProfile_s

a profile and its attributes

typedef struct oyProfiles_s oyProfiles_s

tell about the conversion profiles

general profile infosuse for oyProfile_GetSignature

Since:
Oyranos: version 0.1.8
Date:
10 december 2007 (API 0.1.8)

Enumeration Type Documentation

general profile infosuse for oyProfile_GetSignature

Since:
Oyranos: version 0.1.8
Date:
10 december 2007 (API 0.1.8)
Enumerator:
oySIGNATURE_COLOUR_SPACE 

colour space

oySIGNATURE_PCS 

profile connection space

oySIGNATURE_SIZE 

internal stored size

oySIGNATURE_CMM 

prefered CMM

oySIGNATURE_VERSION 

version

oySIGNATURE_CLASS 

usage class, e.g. 'mntr' ...

oySIGNATURE_MAGIC 

magic; ICC: 'acsp'

oySIGNATURE_PLATFORM 

operating system

oySIGNATURE_OPTIONS 

various ICC header flags

oySIGNATURE_MANUFACTURER 

device manufacturer

oySIGNATURE_MODEL 

device modell

oySIGNATURE_INTENT 

seldom used profile claimed intent

oySIGNATURE_CREATOR 

profile creator ID

oySIGNATURE_DATETIME_YEAR 

creation time in UTC

oySIGNATURE_DATETIME_MONTH 

creation time in UTC

oySIGNATURE_DATETIME_DAY 

creation time in UTC

oySIGNATURE_DATETIME_HOURS 

creation time in UTC

oySIGNATURE_DATETIME_MINUTES 

creation time in UTC

oySIGNATURE_DATETIME_SECONDS 

creation time in UTC


Function Documentation

int oyProfile_AddTagText ( oyProfile_s profile,
icSignature  signature,
const char *  text 
)

add a text tag

Function oyProfile_AddTagText

Version:
Oyranos: 0.1.10
Date:
2009/10/18
Since:
2009/10/18 (Oyranos: 0.1.10)

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

Parameters:
[in]profileother profile
[in]objectthe optional base
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

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'.

Parameters:
[in,out]profilethe profile
[in]devicedevice and driver informations
[in]options- "key_prefix_required" : prefix accept only key names with the prefix Separation by point '.' is allowed.
  • "set_device_attributes"="true" will write "manufacturer", "model", "mnft" and "model_id" keys to the appropriate profile tags and fields.
Version:
Oyranos: 0.3.2
Since:
2009/05/18 (Oyranos: 0.1.10)
Date:
2011/08/21

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 ); 
Parameters:
[in]profilethe profile
[in,out]devicethe device description
Returns:
error
Version:
Oyranos: 0.1.10
Since:
2009/05/22 (Oyranos: 0.1.10)
Date:
2010/10/26

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.

Parameters:
[in]nameprofile file name
[in]flagsfor future extension
[in]objectthe 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.

Version:
Oyranos: 0.1.10
Since:
2007/11/0 (Oyranos: 0.1.9)
Date:
2010/05/18

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

Parameters:
[in]md5hash sum
[in]objectthe optional base
Returns:
a profile
Version:
Oyranos: 0.1.10
Since:
2009/03/20 (Oyranos: 0.1.10)
Date:
2009/03/20

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

Parameters:
[in]sizebuffer size
[in]blockpointer to memory containing a profile
[in]flagsfor future use
[in]objectthe optional base
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

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

Parameters:
[in]sigsignature
[in]typetype of signature to set
[in]objectthe optional base
Version:
Oyranos: 0.1.8
Date:
2008/06/20
Since:
2007/06/20 (Oyranos: 0.1.8)

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

Parameters:
[in]typedefault colour space
[in]objectthe optional base
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

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.

Parameters:
[in]profileaddress of a Oyranos named colour structure
[in]posposition of channel
[in]typesort of text
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

References oyProfile_s::oyProfile_GetChannelNames(), and oyProfile_s::oyProfile_GetChannelsCount().

const oyObject_s * oyProfile_GetChannelNames ( oyProfile_s profile)

get channel names

Parameters:
[in]profilethe profile
Since:
Oyranos: version 0.1.8
Date:
october 2007 (API 0.1.8)

References oyICCColourSpaceGetChannelName(), oyProfile_s::oyProfile_GetChannelsCount(), and oyProfile_s::oyProfile_GetSignature().

Referenced by oyProfile_s::oyProfile_GetChannelName().

int oyProfile_GetChannelsCount ( oyProfile_s profile)
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.

Parameters:
profilethe profile
dl_pos-1, or the position in a device links source chain
Version:
Oyranos: 0.1.8
Since:
2008/02/01 (Oyranos: 0.1.8)
Date:
2008/02/01

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

Since:
Oyranos: version 0.1.8
Date:
26 november 2007 (API 0.1.8)

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.

Parameters:
[in,out]profilethe profile
[in]flagsOY_COMPUTE will calculate the hash OY_FROM_PROFILE - original profile ID
[out]md5the the ICC md5 based profile ID
Returns:
0 - good, 1 >= error, -1 <= issue(s)
Version:
Oyranos: 0.3.0
Since:
2011/01/30 (Oyranos: 0.3.0)
Date:
2011/04/10

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.

Version:
Oyranos: 0.1.10
Since:
2007/12/20 (Oyranos: 0.1.8)
Date:
2010/04/16

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
          );
    
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

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

Parameters:
[in]profilethe profile
[in]idicTagSignature
Since:
Oyranos: version 0.1.8
Date:
2 january 2008 (API 0.1.8)

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

Parameters:
[in]profilethe profile
[in]posheader + tag position
Version:
Oyranos: 0.1.8
Date:
2008/02/06
Since:
2008/02/06 (Oyranos: 0.1.8)

Referenced by oyProfile_s::oyProfile_DeviceAdd().

int oyProfile_GetTagCount ( oyProfile_s profile)

Function oyProfile_GetTagCount

Version:
Oyranos: 0.1.10
Since:
2008/01/01 (Oyranos: 0.1.8)
Date:
2009/12/29

References oyProfileTag_s::oyProfileTag_Release().

int oyProfile_GetTagCount_ ( oyProfile_s profile)

|internal Function oyProfile_GetTagCount_

non thread save

Version:
Oyranos: 0.1.10
Since:
2008/01/01 (Oyranos: 0.1.8)
Date:
2009/12/29

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:

  • oyNAME_NAME - a readable XML element
  • oyNAME_NICK - the hash ID
  • oyNAME_DESCRIPTION - profile internal name (icSigProfileDescriptionTag)
Version:
Oyranos: 0.1.8
Since:
2007/11/26 (Oyranos: 0.1.8)
Date:
2008/06/23

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)
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.

Parameters:
[in]profileprofile
[in]names_chanpointer to channel names
Since:
Oyranos: version 0.1.8
Date:
november 2007 (API 0.1.8)

References oyProfile_s::oyProfile_GetChannelsCount().

OYAPI int OYEXPORT oyProfile_SetSignature ( oyProfile_s profile,
icSignature  sig,
oySIGNATURE_TYPE_e  type 
)
int oyProfile_TagMoveIn ( oyProfile_s profile,
oyProfileTag_s **  obj,
int  pos 
)

add a tag to a profile

Function oyProfile_TagMoveIn

Version:
Oyranos: 0.1.10
Since:
2008/02/01 (Oyranos: 0.1.8)
Date:
2009/12/29

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

Version:
Oyranos: 0.1.8
Date:
2008/03/11
Since:
2008/03/11 (Oyranos: 0.1.8)
int oyProfiles_Count ( oyProfiles_s list)
OYAPI oyProfiles_s *OYEXPORT oyProfiles_Create ( oyProfiles_s patterns,
oyObject_s  object 
)

get a list of installed profiles

Function oyProfiles_Create

Parameters:
[in]patternsa list properties, e.g. classes
objectthe optional object
Version:
Oyranos: 0.1.8
Since:
2008/06/20 (Oyranos: 0.1.8)
Date:
2008/06/20

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 );
    } 
Parameters:
[in,out]listthe to be sorted profile list
[in]devicefilter pattern
[in,out]rank_listlist of rank levels for the profile list
Version:
Oyranos: 0.1.10
Since:
2009/05/22 (Oyranos: 0.1.10)
Date:
2009/05/22

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.

Parameters:
[in]std_profile_classstandard profile class, e.g. oyEDITING_RGB
[out]currentget the colour_space profile position
objecta optional object
Returns:
the profile list
Example - get all standard RGB profiles:
    oyPROFILE_e type = oyEDITING_RGB;
    int current = 0,
        size, i;
    oyProfile_s * temp_prof = 0;
    oyProfiles_s * iccs = 0;

    iccs = oyProfiles_ForStd( type, &current, 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 );
    } 
Version:
Oyranos: 0.1.8
Since:
2008/07/25 (Oyranos: 0.1.8)
Date:
2008/08/06

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 
)
Parameters:
[in]listthe profile list to use
[in]posthe position in list
Returns:
a copy of the profile owned by the caller
Since:
Oyranos: version 0.1.8 2007/11/22
Date:
20 december 2007 (API 0.1.8)

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 
)
Since:
Oyranos: version 0.1.8
Date:
22 november 2007 (API 0.1.8)

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)
Since:
Oyranos: version 0.1.8
Date:
22 november 2007 (API 0.1.8)

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)
Since:
Oyranos: version 0.1.8
Date:
22 november 2007 (API 0.1.8)

Referenced by oyDeviceSetup(), oyProfiles_s::oyProfiles_ForStd(), and oyProfiles_s::oyProfiles_New().

int oyProfiles_ReleaseAt ( oyProfiles_s list,
int  pos 
)
Since:
Oyranos: version 0.1.8
Date:
22 november 2007 (API 0.1.8)
OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Copy ( oyProfileTag_s obj,
oyObject_s  object 
)

Function oyProfileTag_Copy

Since:
Oyranos: version 0.1.8
Date:
1 january 2008 (API 0.1.8)

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.

See also:
oyraProfileTag_Create
oyraFunctionGetInfo
Parameters:
[in]lista list of arguments
[in]tag_typetype to create
[in]versionversion as supported
[in,out]required_cmmin: CMM to create the tag; out: used CMM
[in]objectthe user object for the tag creation
Returns:
a profile tag
Version:
Oyranos: 0.1.8
Since:
2008/01/08 (Oyranos: 0.1.8)
Date:
2008/01/08

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

Parameters:
[in]sigusage signature
[in]typecontent type
[in]statusto be set
[in]tag_sizememory size of tag_block
[in]tag_blockthe to be copied memory
[in]objectthe user object for the tag creation
Returns:
a profile tag
Version:
Oyranos: 0.3.1
Since:
2011/05/13 (Oyranos: 0.3.1)
Date:
2011/05/13

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

Parameters:
[in]texta string
[in]tag_typetype to create, e.g. icSigTextDescriptionType or icSigTextType
[in]tag_usagesignature, e.g. icSigCopyrightTag
[in]objectthe user object for the tag creation
Returns:
a profile tag
Version:
Oyranos: 0.1.10
Since:
2009/01/06 (Oyranos: 0.1.10)
Date:
2009/01/06

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.

Parameters:
[in]tagthe tag to read
Returns:
a list of strings
Version:
Oyranos: 0.3.1
Since:
2008/06/19 (Oyranos: 0.1.8)
Date:
2008/05/17

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.

Parameters:
[in]tagthe tag to read
[out]tag_blockthe raw data owned by the user; on success the block if it has a size; else undefined
[out]tag_sizethe data size; mandatory arg; on success the size returned in tag_block else undefined
[in]allocateFuncthe user allocator
Returns:
0 - success, >= 1 - error
Version:
Oyranos: 0.2.0
Since:
2010/01/31 (Oyranos: 0.2.0)
Date:
2010/06/31
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.

See also:
oyIMProfileTag_GetValues

Hint: to select a certain module use the oyProfileTag_s::required_cmm element from the tag parameter.

For localised strings, e.g. icSigMultiLocalizedUnicodeType:

  • zero language and country args: all localisation strings are returned
  • with language and/or country args: return appropriate matches
  • for language != "", the string starts with language code, the text follows after a colon ":"
  • a non zero but empty language argument == "", returns the pure string in the actual Oyranos locale, no language code
Parameters:
[in]tagthe tag to read
[out]nthe number of returned strings
[in]language2 byte language code, or "" for current
[in]country2 byte country code
[out]tag_sizethe processed tag size
[in]allocateFuncthe user allocator for the returned list
Returns:
a list of strings
Version:
Oyranos: 0.1.8
Since:
2008/01/03 (Oyranos: 0.1.8)
Date:
2008/06/19

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)
OYAPI int OYEXPORT oyProfileTag_Release ( oyProfileTag_s **  obj)

Function oyProfileTag_Release

Since:
Oyranos: version 0.1.8
Date:
1 january 2008 (API 0.1.8)

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.

Parameters:
[in,out]tagthe to be manipulated ICC profile object
[in]sigusage signature
[in]typecontent type
[in]statusto be set
[in]tag_sizememory size of tag_block
[in]tag_blockthe 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.
Returns:
0 - success, 1 - error
Version:
Oyranos: 0.1.10
Since:
2008/01/01 (Oyranos: 0.1.8)
Date:
2009/11/06

References oyProfileTag_s::use.

Referenced by oyProfile_s::oyProfile_DeviceAdd().