![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
The XMP document that carries an image's development: history stack, mask shapes, module order, and the EXIF blob written alongside an export. More...
#include "common/image.h"
Include dependency graph for xmp_sidecar.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| int | dt_exif_read_blob (uint8_t **blob, const char *path, const int32_t imgid, const int sRGB, const int out_width, const int out_height, const int dng_mode) |
| int | dt_exif_xmp_write_with_imgpath (const struct dt_image_t *image, const char *filename, const char *imgpath) |
| int | dt_exif_xmp_attach_export (const int32_t imgid, const char *filename, void *metadata) |
| char * | dt_exif_xmp_read_string (const int32_t imgid) |
| int | dt_exif_xmp_read (dt_image_t *img, const char *filename, const int history_only) |
The XMP document that carries an image's development: history stack, mask shapes, module order, and the EXIF blob written alongside an export.
This is the half of the old common/exif.cc that is not about the photograph's own description. It reads and writes Xmp.darktable.history, masks_history, iop_order_list and their neighbours, so it necessarily names develop/ (layer 5) and imageio/ (layer 6) – eleven dt_ioppr_* symbols, dt_develop_blend_params_t, dt_masks_form_group_t, dt_imageio_dng_write_tiff_header. That is precisely why it could not follow the tag half into src/metadata (layer 1), and why the metadata module gate still reads zero without it.
It belongs in src/history – it serialises the development, not the photograph – and moves there when that module exists. The dt_exif_* names are kept for now so the cut itself stays reviewable; renaming them is that move's business, not this one's.
Definition in file xmp_sidecar.h.
| int dt_exif_read_blob | ( | uint8_t ** | blob, |
| const char * | path, | ||
| const int32_t | imgid, | ||
| const int | sRGB, | ||
| const int | out_width, | ||
| const int | out_height, | ||
| const int | dng_mode | ||
| ) |
write exif to blob, return length in bytes. blob will be allocated by the function. sRGB should be true if sRGB colorspace is used as output.
Definition at line 249 of file xmp_sidecar.cc.
References darktable_package_string, dt_conf_get_int(), DT_DATETIME_EXIF_LENGTH, dt_datetime_img_to_exif(), DT_DATETIME_LENGTH, dt_datetime_now_to_exif(), dt_free, dt_free_gpointer(), dt_image_cache_get(), dt_image_cache_read_release(), dt_metadata_get(), dt_remove_exif_geotag(), dt_remove_exif_keys(), i, IS_NULL_PTR, L, read_metadata_threadsafe, sRGB, and WIDEN.
Referenced by dt_control_merge_hdr_job_run(), and dt_imageio_export_with_flags().
write xmp packet inside an image.
Definition at line 2321 of file xmp_sidecar.cc.
References _exif_get_exiv2_tag_type(), _exif_xmp_read_data_export(), _remove_xmp_keys(), dt_exif_read_exif_tag(), dt_free, dt_image_full_path(), dt_image_path_append_version(), DT_META_EXIF, DT_META_GEOTAG, dt_remove_exif_geotag(), dt_remove_exif_key(), dt_remove_iptc_key(), dt_remove_known_keys(), dt_remove_xmp_key(), dt_remove_xmp_keys(), dt_variables_expand(), dt_variables_params_destroy(), dt_variables_params_init(), dt_variables_set_tags_flags(), FALSE, i, IS_NULL_PTR, key, L, lock, m, PATH_MAX, read_metadata_threadsafe, TRUE, type, and WIDEN.
Referenced by dt_imageio_export_with_flags().
| int dt_exif_xmp_read | ( | dt_image_t * | img, |
| const char * | filename, | ||
| const int | history_only | ||
| ) |
read xmp sidecar file.
Definition at line 1212 of file xmp_sidecar.cc.
References add_mask_entries_to_db(), add_mask_entry_to_db(), add_non_clone_mask_entries_to_db(), history_entry_t::blendop_params, history_entry_t::blendop_params_len, history_entry_t::blendop_version, dt_database_get_last_error(), dt_database_release_transaction, dt_database_rollback_transaction(), dt_database_start_transaction, dt_deprecated(), dt_exif_decode_xmp_data(), dt_exif_xmp_decode(), dt_free, dt_free_gpointer(), dt_history_repository_count_mask_items(), dt_history_repository_delete_history(), dt_history_repository_delete_masks_history(), dt_history_repository_get_next_num(), dt_history_repository_set_end(), dt_history_repository_shift_nums(), dt_history_repository_write_item(), DT_IMAGE_AUTO_PRESETS_APPLIED, DT_IMAGE_NO_LEGACY_PRESETS, DT_IOP_ORDER_ANSEL_RAW, DT_IOP_ORDER_LEGACY, dt_ioppr_deserialize_text_iop_order_list(), dt_ioppr_get_iop_order_link(), dt_ioppr_get_iop_order_list_version(), dt_ioppr_insert_missing_modules(), dt_ioppr_write_iop_order_list(), dt_sort_iop_list_by_order_f(), history_entry_t::enabled, FALSE, dt_image_t::flags, free_history_entry(), free_mask_entry(), dt_image_t::history_hash, dt_image_t::id, dt_iop_order_entry_t::instance, history_entry_t::iop_order, dt_iop_order_entry_t::iop_order_f, IS_NULL_PTR, L, dt_image_raw_parameters_t::legacy, dt_image_t::legacy_flip, MIN, history_entry_t::modversion, history_entry_t::multi_name, history_entry_t::multi_priority, history_entry_t::num, dt_iop_order_entry_t::o, history_entry_t::operation, dt_iop_order_entry_t::operation, out, history_entry_t::params, history_entry_t::params_len, read_history_v1(), read_history_v2(), read_masks(), read_masks_v3(), read_metadata_threadsafe, read_xmp_timestamps(), TRUE, dt_image_raw_parameters_t::user_flip, and WIDEN.
Referenced by _history_load_and_apply_apply(), _image_import_internal(), dt_image_read_duplicates(), and main().
| char * dt_exif_xmp_read_string | ( | const int32_t | imgid | ) |
get the xmp blob for imgid.
Definition at line 2192 of file xmp_sidecar.cc.
References _exif_xmp_read_data(), dt_image_full_path(), dt_image_path_append_version(), dt_remove_known_keys(), ERROR_CODE, FALSE, L, lock, PATH_MAX, and WIDEN.
Referenced by write_image(), and write_image().
| int dt_exif_xmp_write_with_imgpath | ( | const struct dt_image_t * | image, |
| const char * | filename, | ||
| const char * | imgpath | ||
| ) |
write xmp sidecar file.