![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
The seam between metadata/exif.cc and common/xmp_sidecar.cc.
More...
#include "common/global_mutexes.h"#include "common/image.h"#include <exiv2/exiv2.hpp>#include <string>
Include dependency graph for exif_internal.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| class | Lock |
| RAII guard over the process-wide exiv2 lock. More... | |
Macros | |
| #define | read_metadata_threadsafe(image) |
Functions | |
| void | dt_remove_exif_keys (Exiv2::ExifData &exif, const char *keys[], unsigned int n_keys) |
Strip the given EXIF keys from exif, ignoring any that are absent. | |
| bool | dt_exif_read_exif_tag (Exiv2::ExifData &exifData, Exiv2::ExifData::const_iterator *pos, std::string key) |
Read one EXIF tag into pos, FALSE if the image does not carry it. | |
| bool | dt_exif_decode_xmp_data (dt_image_t *img, Exiv2::XmpData &xmpData, int version, bool exif_read) |
Apply one XMP packet's metadata, tags and colour labels to img. | |
The seam between metadata/exif.cc and common/xmp_sidecar.cc.
Those two files were one 4775-line translation unit until they were cut apart, and three functions plus the exiv2 lock are genuinely wanted by both halves. They are declared here rather than in metadata/exif.h because nothing outside those two files has any business calling them: they are the private remainder of the cut, not API.
Include it from exactly those two .cc files. If a third consumer ever appears, that is the signal to promote what it needs into metadata/exif.h deliberately, rather than to widen this one.
Definition in file exif_internal.h.
| #define read_metadata_threadsafe | ( | image | ) |
Definition at line 59 of file exif_internal.h.
| bool dt_exif_decode_xmp_data | ( | dt_image_t * | img, |
| Exiv2::XmpData & | xmpData, | ||
| int | version, | ||
| bool | exif_read | ||
| ) |
Apply one XMP packet's metadata, tags and colour labels to img.
version is the Xmp.darktable.xmp_version of the packet, or -1 when the packet did not come from us. exif_read says whether EXIF was already read for this image, so that XMP is allowed to trump it.
Definition at line 414 of file exif.cc.
References _exif_import_tags(), dt_colorlabels_remove_labels(), dt_colorlabels_set_label(), dt_conf_get_bool(), dt_datetime_exif_to_img(), dt_free, dt_image_get_xmp_mode(), dt_image_set_xmp_rating(), dt_metadata_clear(), dt_metadata_get_key(), DT_METADATA_NUMBER, dt_metadata_set_import(), dt_tag_set_tags(), dt_util_gps_elevation_to_number(), dt_util_gps_string_to_number(), dt_image_geoloc_t::elevation, dt_image_t::exif_lens, FALSE, dt_image_t::filename, FIND_XMP_TAG, dt_image_t::geoloc, i, dt_image_t::id, IS_NULL_PTR, key, L, dt_image_geoloc_t::latitude, dt_image_geoloc_t::longitude, sign, TRUE, and value.
Referenced by dt_exif_read(), and dt_exif_xmp_read().
| bool dt_exif_read_exif_tag | ( | Exiv2::ExifData & | exifData, |
| Exiv2::ExifData::const_iterator * | pos, | ||
| std::string | key | ||
| ) |
Read one EXIF tag into pos, FALSE if the image does not carry it.
Behind the FIND_EXIF_TAG() macro in exif.cc; the sidecar reader calls it directly, on the old EXIF block of an image being re-read.
Definition at line 662 of file exif.cc.
Referenced by dt_exif_xmp_attach_export().
| void dt_remove_exif_keys | ( | Exiv2::ExifData & | exif, |
| const char * | keys[], | ||
| unsigned int | n_keys | ||
| ) |
Strip the given EXIF keys from exif, ignoring any that are absent.
Definition at line 375 of file exif.cc.
Referenced by dt_exif_read_blob(), dt_exif_write_blob(), and dt_remove_exif_geotag().