Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
exif_internal.h
Go to the documentation of this file.
1/*
2 This file is part of Ansel,
3 Copyright (C) 2026 Aurélien PIERRE.
4
5 Ansel is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 Ansel is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with Ansel. If not, see <http://www.gnu.org/licenses/>.
17*/
18
33#ifndef DT_METADATA_EXIF_INTERNAL_H
34#define DT_METADATA_EXIF_INTERNAL_H
35
37#include "common/image.h"
38
39#include <exiv2/exiv2.hpp>
40#include <string>
41
58
59#define read_metadata_threadsafe(image) \
60{ \
61 Lock exiv2_lock; \
62 image->readMetadata(); \
63}
64
66void dt_remove_exif_keys(Exiv2::ExifData &exif, const char *keys[], unsigned int n_keys);
67
72bool dt_exif_read_exif_tag(Exiv2::ExifData &exifData, Exiv2::ExifData::const_iterator *pos,
73 std::string key);
74
80bool dt_exif_decode_xmp_data(dt_image_t *img, Exiv2::XmpData &xmpData, int version,
81 bool exif_read);
82
83#endif // DT_METADATA_EXIF_INTERNAL_H
84
85// clang-format off
86// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
87// vim: shiftwidth=2 expandtab tabstop=2 cindent
88// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
89// clang-format on
RAII guard over the process-wide exiv2 lock.
static int dt_pthread_mutex_unlock(dt_pthread_mutex_t *mutex) RELEASE(mutex) NO_THREAD_SAFETY_ANALYSIS
Definition dtpthread.h:385
static int dt_pthread_mutex_lock(dt_pthread_mutex_t *mutex) ACQUIRE(mutex) NO_THREAD_SAFETY_ANALYSIS
Definition dtpthread.h:375
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.
Definition exif.cc:414
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 exif.cc:375
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.
Definition exif.cc:662
dt_pthread_mutex_t * dt_exiv2_threadsafe_mutex(void)
Definition darktable.c:621
char * key