Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
struct | ImMetaData |
Typedefs | |
typedef struct ImMetaData | ImMetaData |
Functions | |
void | IMB_metadata_free (struct ImBuf *img) |
int | IMB_metadata_get_field (struct ImBuf *img, const char *key, char *value, int len) |
int | IMB_metadata_add_field (struct ImBuf *img, const char *key, const char *field) |
int | IMB_metadata_del_field (struct ImBuf *img, const char *key) |
Definition in file IMB_metadata.h.
typedef struct ImMetaData ImMetaData |
int IMB_metadata_add_field | ( | struct ImBuf * | img, |
const char * | key, | ||
const char * | field | ||
) |
set user data in the ImMetaData struct, which has to be allocated with IMB_metadata_create before calling this function.
img | - the ImBuf that contains the image data |
key | - the key of the field |
value | - the data to be written to the field. zero terminated string |
Definition at line 87 of file metadata.c.
References BLI_strdup(), ImMetaData::key, MEM_callocN(), ImBuf::metadata, ImMetaData::next, and ImMetaData::value.
Referenced by ibJpegImageFromCinfo(), imb_loadpng(), and IMB_metadata_change_field().
int IMB_metadata_del_field | ( | struct ImBuf * | img, |
const char * | key | ||
) |
delete the key/field par in the ImMetaData struct.
img | - the ImBuf that contains the image data |
key | - the key of the field |
Definition at line 113 of file metadata.c.
References ImMetaData::key, MEM_freeN(), ImBuf::metadata, ImMetaData::next, NULL, p, and ImMetaData::value.
void IMB_metadata_free | ( | struct ImBuf * | img | ) |
The metadata is a list of key/value pairs (both char*) that can me saved in the header of several image formats. Apart from some common keys like 'Software' and 'Description' (png standard) we'll use keys within the Blender namespace, so should be called 'Blender::StampInfo' or 'Blender::FrameNum' etc...
Definition at line 46 of file metadata.c.
References ImMetaData::key, MEM_freeN(), ImBuf::metadata, ImMetaData::next, next, and ImMetaData::value.
Referenced by IMB_freeImBuf().
int IMB_metadata_get_field | ( | struct ImBuf * | img, |
const char * | key, | ||
char * | value, | ||
int | len | ||
) |
read the field from the image info into the field
img | - the ImBuf that contains the image data |
key | - the key of the field |
value | - the data in the field, first one found with key is returned, memory has to be allocated by user. |
len | - length of value buffer allocated by user. |
Definition at line 65 of file metadata.c.
References BLI_strncpy(), ImMetaData::key, ImBuf::metadata, ImMetaData::next, and ImMetaData::value.
Referenced by IMB_thumb_manage().