Oyranos  git-devel
Oyranos is a full featured Color Management System
Functions
Profile Handling API

Basic profile helpers. More...

Collaboration diagram for Profile Handling API:

Functions

int oyCheckProfile (const char *filename, const char *colorsig)
 check an file if it is a profile More...
 
int oyCheckProfileMem (const void *mem, size_t size, const char *colorsig)
 check an memory block if it is a profile More...
 
size_t oyGetProfileSize (const char *profilename)
 get the profiles size More...
 
void * oyGetProfileBlock (const char *profilename, size_t *size, oyAlloc_f allocate_func)
 obtain an memory block in the responsibility of the user More...
 
char * oyGetPathFromProfileName (const char *profile_name, oyAlloc_f allocate_func)
 
int oyProfileGetMD5 (void *buffer, size_t size, unsigned char *md5_return)
 calculate a md5 digest beginning after the header offset More...
 

Detailed Description

Basic profile helpers.

Function Documentation

◆ oyCheckProfile()

int oyCheckProfile ( const char *  filename,
const char *  colorsig 
)

check an file if it is a profile

Parameters
filenamethe filename to check
colorsigcolor space signature as described in the ICC specification
Returns
true/false

◆ oyCheckProfileMem()

int oyCheckProfileMem ( const void *  mem,
size_t  size,
const char *  colorsig 
)

check an memory block if it is a profile

Parameters
memthe memory containing the profile
sizethe size of the memory block
colorsigcurrently ignored
Returns
true/false

◆ oyGetPathFromProfileName()

char* oyGetPathFromProfileName ( const char *  profile_name,
oyAlloc_f  allocate_func 
)

Find out where in the Oyranos search path the specified profile resides.

Deprecated:
This function will be substituded by oyProfile_GetFileName.
Parameters
profile_namethe filename find in the Oyranos search path
allocate_funcuser provided function for allocating the string memory
Returns
the path name where the profile was found in the Oyranos search path

◆ oyGetProfileBlock()

void* oyGetProfileBlock ( const char *  profilename,
size_t *  size,
oyAlloc_f  allocate_func 
)

obtain an memory block in the responsibility of the user

Please note the size parameter is sensible. Eighter set it to zero or to the size obtained with oyGetProfileSize to get the full data or specify the size you want to get a partitial profile.
This feature is useful for instance to get only the headers of many profiles.

Parameters
profilenamespecifies the profile
[in]sizedesired size, or zero for a complete copy
[out]sizethe size of the returned block
allocate_functhe users memory allocation function
Returns
the profile block in memory allocated by oyAlloc_f

◆ oyGetProfileSize()

size_t oyGetProfileSize ( const char *  profilename)

get the profiles size

Parameters
profilenamespecifies the profile
Returns
size

◆ oyProfileGetMD5()

int oyProfileGetMD5 ( void *  buffer,
size_t  size,
unsigned char *  md5_return 
)

calculate a md5 digest beginning after the header offset

The md5 implementation is written by L. Peter Deutsch

Parameters
[in]buffercomplete profiles buffer
[in]sizeover all profile size
[out]md5_returnbuffer to write in the md5 digest (128 bytes)
Returns
-1 wrong profile_id detected, 0 - good, 1 - error
error