Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
exif_internal.h File Reference

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.
 

Detailed Description

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.

Macro Definition Documentation

◆ read_metadata_threadsafe

#define read_metadata_threadsafe (   image)
Value:
{ \
image->readMetadata(); \
}
RAII guard over the process-wide exiv2 lock.

Definition at line 59 of file exif_internal.h.

Function Documentation

◆ dt_exif_decode_xmp_data()

bool dt_exif_decode_xmp_data ( dt_image_t img,
Exiv2::XmpData xmpData,
int  version,
bool  exif_read 
)

◆ dt_exif_read_exif_tag()

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.

References key, and L.

Referenced by dt_exif_xmp_attach_export().

◆ dt_remove_exif_keys()

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.

References i, and L.

Referenced by dt_exif_read_blob(), dt_exif_write_blob(), and dt_remove_exif_geotag().