oyProfile_s Struct Reference
Description: C source code API documentation for the Oyranos project.
Keywords: Oyranos,Color Management,Color Management,ICC,CMS,C,doxygen,API,documentation

| Oyranos Color Management System API - Version 0.9.6

Public Member Functions | Data Fields
oyProfile_s Struct Reference
Color » ICC Profile APIs

A profile and its attributes. More...

`#include <oyProfile_s.h>`

Inheritance diagram for oyProfile_s:
Collaboration diagram for oyProfile_s:

## Public Member Functions
OYAPI oyProfile_s *OYEXPORT | oyProfile_New (oyObject_s object)
| allocate a new Profile object More...
| oyProfile_Copy
| Copy or Reference a Profile object. More...
OYAPI int OYEXPORT | oyProfile_Release (oyProfile_s **profile)
| release and possibly deallocate a oyProfile_s object More...
OYAPI oyProfile_s *OYEXPORT | oyProfile_FromStd (oyPROFILE_e type, uint32_t flags, oyObject_s object)
| Create from default color space settings. More...
OYAPI oyProfile_s *OYEXPORT | oyProfile_FromName (const char *name, uint32_t flags, oyObject_s object)
| Create from name. More...
OYAPI oyProfile_s *OYEXPORT | oyProfile_FromFile (const char *name, uint32_t flags, oyObject_s object)
| Create from file. More...
OYAPI oyProfile_s *OYEXPORT | oyProfile_FromMem (size_t size, const oyPointer block, uint32_t flags, oyObject_s object)
| Create from in memory blob. More...
OYAPI oyProfile_s *OYEXPORT | oyProfile_FromSignature (icSignature sig, oySIGNATURE_TYPE_e type, oyObject_s object)
| Create a fractional profile from signature. More...
OYAPI oyProfile_s *OYEXPORT | oyProfile_FromMD5 (uint32_t *md5, uint32_t flags, oyObject_s object)
| Look up a profile from it's md5 hash sum. More...
OYAPI oyProfile_s *OYEXPORT | oyProfile_FromTaxiDB (oyOptions_s *options, oyObject_s object)
| look up a profile of a device from Taxi DB More...
OYAPI int OYEXPORT | oyProfile_Install (oyProfile_s *profile, oySCOPE_e scope, oyOptions_s *options)
| Install a ICC profile. More...
OYAPI int OYEXPORT | oyProfile_GetChannelsCount (oyProfile_s *profile)
| Number of channels in a color space. More...
OYAPI icSignature OYEXPORT | oyProfile_GetSignature (oyProfile_s *profile, oySIGNATURE_TYPE_e type)
| Get ICC color space signature. More...
OYAPI int OYEXPORT | oyProfile_SetSignature (oyProfile_s *profile, icSignature sig, oySIGNATURE_TYPE_e type)
| Set signature. More...
OYAPI void OYEXPORT | oyProfile_SetChannelNames (oyProfile_s *profile, oyObject_s *names_chan)
| Set channel names. More...
OYAPI const oyObject_s *OYEXPORT | oyProfile_GetChannelNames (oyProfile_s *profile)
| Get channel names. More...
OYAPI const char *OYEXPORT | oyProfile_GetChannelName (oyProfile_s *profile, int pos, oyNAME_e type)
| Get a channels name. More...
OYAPI const oyChar *OYEXPORT | oyProfile_GetID (oyProfile_s *profile)
| Get unique name. More...
OYAPI int OYEXPORT | oyProfile_Equal (oyProfile_s *profileA, oyProfile_s *profileB)
| Check if two profiles are equal by their hash sum. More...
OYAPI const oyChar *OYEXPORT | oyProfile_GetText (oyProfile_s *profile, oyNAME_e type)
| Get a presentable name. More...
OYAPI oyPointer OYEXPORT | oyProfile_GetMem (oyProfile_s *profile, size_t *size, uint32_t flag, oyAlloc_f allocateFunc)
| Get the ICC profile in memory. More...
OYAPI size_t OYEXPORT | oyProfile_GetSize (oyProfile_s *profile, uint32_t flag)
| Get the ICC profile in memory size. More...
OYAPI oyProfileTag_s *OYEXPORT | oyProfile_GetTagByPos (oyProfile_s *profile, int pos)
| Get a profile tag. More...
OYAPI oyProfileTag_s *OYEXPORT | oyProfile_GetTagById (oyProfile_s *profile, icTagSignature id)
| Get a profile tag by its tag signature. More...
OYAPI int OYEXPORT | oyProfile_GetTagCount (oyProfile_s *profile)
OYAPI int OYEXPORT | oyProfile_TagMoveIn (oyProfile_s *profile, oyProfileTag_s **obj, int pos)
| Add a tag to a profile. More...
OYAPI int OYEXPORT | oyProfile_TagReleaseAt (oyProfile_s *profile, int pos)
| Remove a tag from a profile. More...
OYAPI int OYEXPORT | oyProfile_AddTagText (oyProfile_s *profile, icSignature signature, const char *text)
| Add a text tag. More...
OYAPI const char *OYEXPORT | oyProfile_GetFileName (oyProfile_s *profile, int dl_pos)
| Get the ICC profile location in the filesystem. More...
OYAPI int OYEXPORT | oyProfile_GetDevice (oyProfile_s *profile, oyConfig_s *device)
| Obtain device information from a profile. More...
int | oyProfile_GetMD5 (oyProfile_s *profile, int flags, uint32_t *md5)
| Get the ICC profile md5 hash sum. More...
int | oyProfile_AddDevice (oyProfile_s *profile, oyConfig_s *device, oyOptions_s *options)
| Add device and driver informations to a profile. More...
Public Member Functions inherited from oyStruct_s
const char * | oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| get object infos from a module More...
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| Get a text dump. More...
| oyStruct_RegisterStaticMessageFunc
| register a function for verbosity More...
| oyStruct_GetInfo
| get a additional string from a object More...
const char * | oyStructTypeToText (oyOBJECT_e type)
| Objects type to small string. More...

## Data Fields
const oyOBJECT_e | type_
| Type of object. More...
oyStruct_Copy_f | copy
| Copy function. More...
oyStruct_Release_f | release
| Release function. More...
oyObject_s | oy_
| Oyranos internal object. More...
Data Fields inherited from oyStruct_s
const oyOBJECT_e | type_
| Type of object. More...
oyStruct_Copy_f | copy
| Copy function. More...
oyStruct_Release_f | release
| Release function. More...
oyObject_s | oy_
| Oyranos internal object. More...

## Detailed Description

A profile and its attributes.

Version
  Oyranos: x.x.x

Since
  YYYY/MM/DD (Oyranos: x.x.x)

Date
  YYYY/MM/DD

Examples:
  image2pdf.c, image_display.cpp, oymd5icc.c, oyranos_cmm_oJPG.c, tutorial1.c, and tutorial_taxi.c.

## Member Function Documentation

## ◆ oyProfile_AddDevice()

int oyProfile_AddDevice | ( | oyProfile_s * | profile,
|  | oyConfig_s * | device,
|  | oyOptions_s * | options
| ) |  |

Add device and driver informations to a profile.

Function oyProfile_AddDevice

oyProfile_AddDevice() 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] | 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. "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(), oyConfig_s::oyConfig_GetOptions(), oyFILTER_REG_MAX, oyFilterRegistrationToText(), oyOption_s::oyOption_GetRegistration(), oyOption_s::oyOption_GetValueText(), oyOption_s::oyOption_New(), oyOption_s::oyOption_SetFromText(), oyOption_s::oyOption_SetRegistration(), oyOptions_s::oyOptions_FindString(), oyOptions_s::oyOptions_MoveIn(), and oyValueUInt32().

## ◆ oyProfile_AddTagText()

OYAPI int OYEXPORT 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)

Examples:
  oyranos_cmm_oJPG.c.

References oyProfile_GetSignature(), oySIGNATURE_VERSION, and oyValueUInt32().

## ◆ oyProfile_Copy()

oyProfile_Copy

Copy or Reference a Profile object.

The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.

Parameters

  [in] | profile | Profile struct object
  | object | NULL - means reference, the optional object triggers a real copy

Examples:
  image2pdf.c.

Referenced by oyImage_s::oyImage_Create(), oyImage_s::oyImage_GetProfile(), oyNamedColor_s::oyNamedColor_Create(), and oyNamedColor_s::oyNamedColor_GetSpaceRef().

## ◆ oyProfile_Equal()

OYAPI int OYEXPORT oyProfile_Equal | ( | oyProfile_s * | profileA,
|  | oyProfile_s * | profileB
| ) |  |

Check if two profiles are equal by their hash sum.

Function oyProfile_Equal

Version
  Oyranos: 0.1.8

Since
  2008/02/03 (Oyranos: 0.1.8)

Date
  2009/04/16

References oy_.

## ◆ oyProfile_FromFile()

OYAPI oyProfile_s *OYEXPORT oyProfile_FromFile | ( | const char * | name,
|  | uint32_t | flags,
|  | oyObject_s | object
| ) |  |

Create from file.

Function oyProfile_FromFile

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] | name | profile file name
  [in] | flags | OY_NO_CACHE_READ, OY_NO_CACHE_WRITE, OY_COMPUTE - compute ID, OY_NO_REPAIR
  [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.
- OY_COMPUTE lets newly compute ID
- OY_ICC_VERSION_2 and OY_ICC_VERSION_4 let select version 2 and 4 profiles separately.
- OY_NO_REPAIR skip automatic adding a ID hash if missed, useful for pure analysis
- OY_SKIP_NON_DEFAULT_PATH ignore profiles outside of default paths

Version
  Oyranos: 0.9.6

Since
  2007/11/0 (Oyranos: 0.1.9)

Date
  2014/04/16

Examples:
  oymd5icc.c.

## ◆ oyProfile_FromMD5()

OYAPI oyProfile_s *OYEXPORT oyProfile_FromMD5 | ( | uint32_t * | md5,
|  | uint32_t | flags,
|  | oyObject_s | object
| ) |  |

Look up a profile from it's md5 hash sum.

Function oyProfile_FromMD5

Parameters

  [in] | md5 | hash sum
  [in] | flags | flags are OY_NO_CACHE_READ, OY_NO_CACHE_WRITE, OY_COMPUTE 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. OY_COMPUTE lets newly compute ID OY_ICC_VERSION_2 and OY_ICC_VERSION_4 let select version 2 and 4 profiles separately. OY_NO_REPAIR skip automatic adding a ID hash if missed, useful for pure analysis OY_SKIP_NON_DEFAULT_PATH ignore profiles outside of default paths
  [in] | object | the optional base

Returns
  a profile

Version
  Oyranos: 0.9.6

Date
  2015/01/03

Since
  2009/03/20 (Oyranos: 0.1.10)

## ◆ oyProfile_FromMem()

OYAPI oyProfile_s *OYEXPORT oyProfile_FromMem | ( | size_t | size,
|  | const oyPointer | block,
|  | uint32_t | flags,
|  | oyObject_s | object
| ) |  |

Create from in memory blob.

Function oyProfile_FromMem

Parameters

  [in] | size | buffer size
  [in] | block | pointer to memory containing a profile
  [in] | flags | for future use
  [in] | object | the optional base

Since
  Oyranos: version 0.1.8

Date
  november 2007 (API 0.1.8)

Examples:
  oyranos_cmm_oJPG.c.

## ◆ oyProfile_FromName()

OYAPI oyProfile_s *OYEXPORT oyProfile_FromName | ( | const char * | name,
|  | uint32_t | flags,
|  | oyObject_s | object
| ) |  |

Create from name.

Function oyProfile_FromName

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. Hash names, internal descriptions and wildcards can be used.

Parameters

  [in] | name | name can be profile file name, ICC ID, wildcard or internal description. Following are some examples. A possible file name could be "sRGB.icc". A valid ICC ID would be "7fb30d688bf82d32a0e748daf3dba95d". A internal description could be "sRGB". Supported name wildcards are "rgb" for default editing RGB "cmyk" for default editing CMYK profile "gray" for default editing Gray profile "lab" for default editing CIE*Lab profile "xyz" for default editing CIE*XYZ profile "web" for default web profile sRGB "rgbi" for default assumed RGB profile "cmyki" for default assumed CMYK profile "grayi" for default assumed Gray profile "labi" for default assumed CIE*Lab profile "xyzi" for default assumed CIE*XYZ profile "proof" for default simulation profile "effect" for default effect profile
  [in] | flags | flags are OY_NO_CACHE_READ, OY_NO_CACHE_WRITE, OY_COMPUTE 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. OY_COMPUTE lets newly compute ID OY_ICC_VERSION_2 and OY_ICC_VERSION_4 let select version 2 and 4 profiles separately. OY_NO_REPAIR skip automatic adding a ID hash if missed, useful for pure analysis OY_SKIP_NON_DEFAULT_PATH ignore profiles outside of default paths
  [in] | object | the optional base

See also
  oyProfile_FromFile() and oyProfile_FromMD5()

// get editing "rgb" profile for selected / configured CMM
oyOptions_s * options = NULL; // the selection options can come from command line
uint32_t icc_profile_flags = oyICCProfileSelectionFlagsFromOptions( OY_CMM_STD,
"//" OY_TYPE_STD "/icc_color",
options, 0 );
oyProfile_s * p = oyProfile_FromName( "rgb", icc_profile_flags, NULL );

Version
  Oyranos: 0.9.6

Date
  2014/05/06

Since
  2014/05/06 (Oyranos: 0.9.6)

Examples:
  image_display.cpp, and oyranos_cmm_oJPG.c.

## ◆ oyProfile_FromSignature()

OYAPI oyProfile_s *OYEXPORT oyProfile_FromSignature | ( | icSignature | sig,
|  | oySIGNATURE_TYPE_e | type,
|  | oyObject_s | object
| ) |  |

Create a fractional profile from signature.

Function oyProfile_FromSignature

Parameters

  [in] | sig | signature
  [in] | type | type of signature to set
  [in] | object | the optional base

Version
  Oyranos: 0.1.8

Date
  2008/06/20

Since
  2007/06/20 (Oyranos: 0.1.8)

References oyProfile_SetSignature().

## ◆ oyProfile_FromStd()

OYAPI oyProfile_s *OYEXPORT oyProfile_FromStd | ( | oyPROFILE_e | type,
|  | uint32_t | flags,
|  | oyObject_s | object
| ) |  |

Create from default color space settings.

Function oyProfile_FromStd

Parameters

  [in] | type | default color space
  [in] | flags | see -> oyProfile_FromFile()
  [in] | object | the optional base

Version
  Oyranos: 0.9.6

Since
  2007/11/0 (Oyranos: 0.1.9)

Date
  2014/04/04

Examples:
  image2pdf.c, oyranos_cmm_oJPG.c, and tutorial1.c.

Referenced by oyImage_s::oyImage_CreateForDisplay().

## ◆ oyProfile_FromTaxiDB()

OYAPI oyProfile_s *OYEXPORT oyProfile_FromTaxiDB | ( | oyOptions_s * | options,
|  | oyObject_s | object
| ) |  |

look up a profile of a device from Taxi DB

Function oyProfile_FromTaxiDB

The function asks the online ICC Taxi DB for a profile. It is therefore blocking and can cause a serious delay before returning.

The TAXI_id option is expected to come from oyConfig_GetBestMatchFromTaxiDB() or oyDevicesFromTaxiDB().

Parameters

  [in] | options | - "TAXI_id" shall provide a string for device driver parameter selection
  [out] | profile | the resulting profile

Returns
  error

Version
  Oyranos: 0.3.3

Since
  2012/01/08 (Oyranos: 0.3.3)

Date
  2012/01/08

Examples:
  tutorial_taxi.c.

## ◆ oyProfile_GetChannelName()

OYAPI const char *OYEXPORT oyProfile_GetChannelName | ( | oyProfile_s * | profile,
|  | int | pos,
|  | oyNAME_e | type
| ) |  |

Get a channels name.

Function oyProfile_GetChannelName

A convinience function to get a single name with a certain type.

Parameters

  [in] | profile | address of a Oyranos named color structure
  [in] | pos | position of channel
  [in] | type | sort of text

Since
  Oyranos: version 0.1.8

Date
  november 2007 (API 0.1.8)

References oyObject_GetName(), oyOBJECT_PROFILE_S, oyProfile_GetChannelNames(), and oyProfile_GetChannelsCount().

## ◆ oyProfile_GetChannelNames()

OYAPI const oyObject_s *OYEXPORT oyProfile_GetChannelNames | ( | oyProfile_s * | profile | ) |

Get channel names.

Function oyProfile_GetChannelNames

Parameters

  [in] | profile | the profile

Since
  Oyranos: version 0.1.8

Date
  october 2007 (API 0.1.8)

References oyICCColorSpaceGetChannelName(), oyNAME_DESCRIPTION, oyNAME_NAME, oyNAME_NICK, oyObject_NewFrom(), oyOBJECT_PROFILE_S, oyObject_SetNames(), oyProfile_GetChannelsCount(), oyProfile_GetSignature(), and oySIGNATURE_COLOR_SPACE.

Referenced by oyProfile_GetChannelName().

## ◆ oyProfile_GetChannelsCount()

OYAPI int OYEXPORT oyProfile_GetChannelsCount | ( | oyProfile_s * | profile | ) |

Number of channels in a color space.

Function oyProfile_GetChannelsCount

Since
  Oyranos: version 0.1.8

Date
  november 2007 (API 0.1.8)

Examples:
  image2pdf.c.

References oyICCColorSpaceGetChannelCount(), and oyOBJECT_PROFILE_S.

Referenced by oyConversion_s::oyConversion_CreateBasicPixelsFromBuffers(), oyNamedColor_s::oyNamedColor_Create(), oyProfile_GetChannelName(), oyProfile_GetChannelNames(), and oyProfile_SetChannelNames().

## ◆ oyProfile_GetDevice()

OYAPI int OYEXPORT oyProfile_GetDevice | ( | oyProfile_s * | profile,
|  | oyConfig_s * | device
| ) |  |

Obtain device information from a profile.

Function oyProfile_GetDevice

oyConfig_s * device = oyConfig_FromRegistration( "//" OY_TYPE_STD "/config", object );
oyProfile_GetDevice( profile, device );

Parameters

  [in] | profile | the profile
  [in,out] | device | the device description

Returns
  error

Version
  Oyranos: 0.1.10

Since
  2009/05/22 (Oyranos: 0.1.10)

Date
  2010/10/26

## ◆ oyProfile_GetFileName()

OYAPI const char *OYEXPORT 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

  profile | the 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

Examples:
  tutorial_taxi.c.

## ◆ oyProfile_GetID()

OYAPI const oyChar *OYEXPORT oyProfile_GetID | ( | oyProfile_s * | profile | ) |

Get unique name.

Function oyProfile_GetID

the returned string is identical to oyNAME_NICK

Since
  Oyranos: version 0.1.8

Date
  26 november 2007 (API 0.1.8)

References oyNAME_NICK, oyObject_GetName(), and oyOBJECT_PROFILE_S.

## ◆ oyProfile_GetMD5()

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] | profile | the profile
  [in] | flags | OY_COMPUTE - calculate the hash OY_FROM_PROFILE - original profile ID
  [out] | md5 | 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

Examples:
  oymd5icc.c.

## ◆ 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

## ◆ oyProfile_GetSignature()

OYAPI icSignature OYEXPORT oyProfile_GetSignature | ( | oyProfile_s * | profile,
|  | oySIGNATURE_TYPE_e | type
| ) |  |

Get ICC color space signature.

Function oyProfile_GetSignature

// 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 color space: %s version: %d.%d.%d\n",
oyICCColorSpaceGetName( (icColorSpaceSignature)
oyProfile_GetSignature(p,oySIGNATURE_PCS) ),
oyICCColorSpaceGetName( (icColorSpaceSignature)
oyProfile_GetSignature(p,oySIGNATURE_COLOR_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)

Examples:
  oyranos_cmm_oJPG.c.

References oyOBJECT_PROFILE_S, and oySIGNATURE_COLOR_SPACE.

Referenced by oyProfile_AddTagText(), and oyProfile_GetChannelNames().

## ◆ oyProfile_GetSize()

OYAPI size_t OYEXPORT oyProfile_GetSize | ( | oyProfile_s * | profile,
|  | uint32_t | flag
| ) |  |

Get the ICC profile in memory size.

Function oyProfile_GetSize

The prefered memory comes from the unmodified original memory. Otherwise a previously modified tag list is serialised into memory.

Version
  Oyranos: 0.5.0

Date
  2012/10/05

Since
  2012/10/05 (Oyranos: 0.5.0)

## ◆ oyProfile_GetTagById()

OYAPI oyProfileTag_s *OYEXPORT oyProfile_GetTagById | ( | oyProfile_s * | profile,
|  | icTagSignature | id
| ) |  |

Get a profile tag by its tag signature.

Function oyProfile_GetTagById

Parameters

  [in] | profile | the profile
  [in] | id | icTagSignature

Since
  Oyranos: version 0.1.8

Date
  2 january 2008 (API 0.1.8)

References oyObject_Lock(), oyOBJECT_PROFILE_S, oyObject_UnLock(), and oyProfileTag_s::oyProfileTag_Release().

## ◆ oyProfile_GetTagByPos()

OYAPI oyProfileTag_s *OYEXPORT oyProfile_GetTagByPos | ( | oyProfile_s * | profile,
|  | int | pos
| ) |  |

Get a profile tag.

Function oyProfile_GetTagByPos

Parameters

  [in] | profile | the profile
  [in] | pos | header + tag position

Version
  Oyranos: 0.1.8

Date
  2008/02/06

Since
  2008/02/06 (Oyranos: 0.1.8)

References oyObject_Lock(), oyOBJECT_PROFILE_S, and oyObject_UnLock().

## ◆ oyProfile_GetTagCount()

OYAPI int OYEXPORT 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 oyObject_Lock(), oyOBJECT_PROFILE_S, oyObject_UnLock(), oyProfileTag_s::oyProfileTag_Release(), and oyStructList_s::oyStructList_Count().

## ◆ oyProfile_GetText()

OYAPI const oyChar *OYEXPORT oyProfile_GetText | ( | oyProfile_s * | profile,
|  | oyNAME_e | type
| ) |  |

Get a presentable name.

Function oyProfile_GetText

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

Examples:
  image2pdf.c, tutorial1.c, and tutorial_taxi.c.

Referenced by oyFilterCore_s::oyFilterCore_GetText().

## ◆ oyProfile_Install()

OYAPI int OYEXPORT oyProfile_Install | ( | oyProfile_s * | profile,
|  | oySCOPE_e | scope,
|  | oyOptions_s * | options
| ) |  |

Install a ICC profile.

Function oyProfile_Install

Without options, the ICC profile will be installed into the users ICC profile path. For obtaining a useful path name see Path Names.

Parameters

  [in] | profile | the profile
  [in] | scope | the scope to install to; default is oySCOPE_USER
  [in] | options | "path" can provide a string for manual path selection "device" = "1" - write to device paths

Returns
  error
  - oyOK - success
  - >= 1 error
  - oyERROR_USER msg -> wrong or missing argument
  - oyERROR_DATA_WRITE msg -> path can not be written
  - oyERROR_DATA_AMBIGUITY msg -> "Profile already installed"
  - oyCORRUPTED msg -> profile not useable

Version
  Oyranos: 0.9.6

Date
  2014/06/04

Since
  2012/01/13 (Oyranos: 0.9.1)

1. construct a profile name

1.1 add user profile path name by default or custom from "path" option

1.2 for "device" = "1" option add xxx/devices/device_class_description_xxx/

1.3 add ".icc" suffix as needed

1. check if file or description name exists
2. open profile

3.1 write profile

Examples:
  oyranos_cmm_oJPG.c, and tutorial_taxi.c.

## ◆ oyProfile_New()

OYAPI oyProfile_s *OYEXPORT oyProfile_New | ( | oyObject_s | object | ) |

allocate a new Profile object

Function oyProfile_New

References oyOBJECT_OBJECT_S.

## ◆ oyProfile_Release()

OYAPI int OYEXPORT oyProfile_Release | ( | oyProfile_s ** | profile | ) |

release and possibly deallocate a oyProfile_s object

Function oyProfile_Release

Parameters

  [in,out] | profile | Profile struct object

Examples:
  image2pdf.c.

References oyOBJECT_PROFILE_S.

Referenced by oyImage_s::oyImage_CreateForDisplay().

## ◆ oyProfile_SetChannelNames()

OYAPI void OYEXPORT oyProfile_SetChannelNames | ( | oyProfile_s * | profile,
|  | oyObject_s * | names_chan
| ) |  |

Set channel names.

Function oyProfile_SetChannelNames

The function should be used to specify extra channels or unusual color layouts like CMYKRB. The number of elements in names_chan should fit to the channels count or to the color space signature.

You can let single entries empty if they are understandable by the color space signature. Oyranos will set them for you on request.

Parameters

  [in] | profile | profile
  [in] | names_chan | pointer to channel names

Since
  Oyranos: version 0.1.8

Date
  november 2007 (API 0.1.8)

References oyObject_Copy(), oyOBJECT_PROFILE_S, and oyProfile_GetChannelsCount().

## ◆ oyProfile_SetSignature()

OYAPI int OYEXPORT oyProfile_SetSignature | ( | oyProfile_s * | profile,
|  | icSignature | sig,
|  | oySIGNATURE_TYPE_e | type
| ) |  |

Set signature.

Function oyProfile_SetSignature

Parameters

  [in] | profile | the profile
  [in] | sig | signature
  [in] | type | type of signature to set

Version
  Oyranos: 0.1.8

Date
  2008/06/20

Since
  2007/06/20 (Oyranos: 0.1.8)

References oyOBJECT_PROFILE_S, and oySIGNATURE_COLOR_SPACE.

Referenced by oyProfile_FromSignature().

## ◆ oyProfile_TagMoveIn()

OYAPI int OYEXPORT 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 oyObject_Lock(), oyOBJECT_PROFILE_S, oyOBJECT_PROFILE_TAG_S, oyProfileTag_s::oyProfileTag_Release(), oyStructList_s::oyStructList_MoveIn(), and oyProfileTag_s::type_.

## ◆ oyProfile_TagReleaseAt()

OYAPI int OYEXPORT 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)

References oyObject_Lock(), oyOBJECT_PROFILE_S, oyObject_UnLock(), and oyStructList_s::oyStructList_ReleaseAt().

## Field Documentation

## ◆ copy

oyStruct_Copy_f oyProfile_s::copy

Copy function.

## ◆ oy_

oyObject_s oyProfile_s::oy_

Oyranos internal object.

Features name and hash. Do not change during object life time.

Referenced by oyProfile_Equal().

## ◆ release

oyStruct_Release_f oyProfile_s::release

Release function.

## ◆ type_

const oyOBJECT_e oyProfile_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.

Referenced by oyProfiles_s::oyProfiles_MoveIn().