|
Blender V4.3
|
#include <cstdlib>#include <cstring>#include "BLI_listbase.h"#include "BLI_string.h"#include "BLI_utildefines.h"#include "BKE_idprop.hh"#include "DNA_ID.h"#include "IMB_imbuf_types.hh"#include "IMB_metadata.hh"Go to the source code of this file.
Functions | |
| void | IMB_metadata_ensure (IDProperty **metadata) |
| void | IMB_metadata_free (IDProperty *metadata) |
| bool | IMB_metadata_get_field (const IDProperty *metadata, const char *key, char *value, const size_t value_maxncpy) |
| void | IMB_metadata_copy (ImBuf *ibuf_dst, const ImBuf *ibuf_src) |
| void | IMB_metadata_set_field (IDProperty *metadata, const char *key, const char *value) |
| void | IMB_metadata_foreach (ImBuf *ibuf, IMBMetadataForeachCb callback, void *userdata) |
Definition at line 60 of file metadata.cc.
References BLI_assert, IDP_CopyProperty(), IMB_metadata_free(), and ImBuf::metadata.
Referenced by do_render_sequencer(), IMB_makeSingleUser(), imbuf_ensure_editable(), input_preprocess(), prepare_effect_imbufs(), seq_proxy_build_frame(), and seq_render_strip_stack().
| void IMB_metadata_ensure | ( | IDProperty ** | metadata | ) |
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...
The keys & values are stored in ID properties, in the group "metadata". Ensure that the metadata property is a valid IDProperty object. This is a no-op when *metadata != NULL.
Definition at line 24 of file metadata.cc.
References blender::bke::idprop::create_group().
Referenced by BKE_imbuf_stamp_info(), BKE_stamp_info_from_imbuf(), blend_file_thumb_from_camera(), blend_file_thumb_from_screenshot(), blender::imbuf::get_oiio_ibuf(), ibJpegImageFromCinfo(), IMB_anim_load_metadata(), IMB_anim_previewframe(), imb_load_openexr(), IMB_thumb_load_image(), and thumb_create_ex().
| void IMB_metadata_foreach | ( | ImBuf * | ibuf, |
| IMBMetadataForeachCb | callback, | ||
| void * | userdata ) |
Definition at line 88 of file metadata.cc.
References callback, IDProperty::data, IDPropertyData::group, IDP_String, LISTBASE_FOREACH, and ImBuf::metadata.
Referenced by BKE_stamp_info_from_imbuf(), ED_region_image_metadata_panel_draw(), metadata_box_height_get(), and metadata_draw_imbuf().
| void IMB_metadata_free | ( | IDProperty * | metadata | ) |
Definition at line 33 of file metadata.cc.
References IDP_FreeProperty().
Referenced by IMB_free_anim(), IMB_freeImBuf(), and IMB_metadata_copy().
| bool IMB_metadata_get_field | ( | const IDProperty * | metadata, |
| const char * | key, | ||
| char * | value, | ||
| size_t | value_maxncpy ) |
Read the field from the image info into the field.
| metadata | the IDProperty that contains the metadata |
| 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 42 of file metadata.cc.
References BLI_strncpy(), IDP_GetPropertyFromGroup(), IDP_STRING, IDP_String, and IDProperty::type.
Referenced by file_draw_tooltip_custom_func(), IMB_thumb_manage(), metadata_get_field(), metadata_is_valid(), and uiTemplateRecentFiles_tooltip_func().
| void IMB_metadata_set_field | ( | IDProperty * | metadata, |
| const char * | key, | ||
| const char * | value ) |
Set user data in the metadata. If the field already exists its value is overwritten, otherwise the field will be added with the given value.
| metadata | the IDProperty that contains the metadata |
| key | the key of the field |
| value | the data to be written to the field. zero terminated string |
Definition at line 69 of file metadata.cc.
References BLI_assert, blender::bke::idprop::create(), IDP_AddToGroup(), IDP_AssignString(), IDP_FreeFromGroup(), IDP_GetPropertyFromGroup(), IDP_STRING, and IDProperty::type.
Referenced by blend_file_thumb_from_camera(), blend_file_thumb_from_screenshot(), blender::imbuf::get_oiio_ibuf(), ibJpegImageFromCinfo(), IMB_anim_load_metadata(), IMB_anim_previewframe(), imb_load_openexr(), IMB_thumb_load_image(), metadata_set_field(), and thumb_create_ex().