Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
common/image.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2009-2014 johannes hanika.
4 Copyright (C) 2010 Bruce Guenter.
5 Copyright (C) 2010-2011 Henrik Andersson.
6 Copyright (C) 2010-2012, 2014, 2016, 2018-2019 Tobias Ellinghaus.
7 Copyright (C) 2011 José Carlos García Sogo.
8 Copyright (C) 2011-2012, 2014 Jérémy Rosen.
9 Copyright (C) 2011 Robert Bieber.
10 Copyright (C) 2012 Christian Tellefsen.
11 Copyright (C) 2012 marcel.
12 Copyright (C) 2012 Richard Wonka.
13 Copyright (C) 2013 Jean-Sébastien Pédron.
14 Copyright (C) 2013, 2015, 2018-2022 Pascal Obry.
15 Copyright (C) 2013-2017 Roman Lebedev.
16 Copyright (C) 2013 Ulrich Pegelow.
17 Copyright (C) 2014 Dan Torop.
18 Copyright (C) 2014 Edouard Gomez.
19 Copyright (C) 2014 Pascal de Bruijn.
20 Copyright (C) 2014-2016 Pedro Côrte-Real.
21 Copyright (C) 2017 Žilvinas Žaltiena.
22 Copyright (C) 2018 Kelvie Wong.
23 Copyright (C) 2019-2021 Aldric Renaudin.
24 Copyright (C) 2019 Andreas Schneider.
25 Copyright (C) 2019 August Schwerdfeger.
26 Copyright (C) 2019 Bill Ferguson.
27 Copyright (C) 2019-2022 Hanno Schwalm.
28 Copyright (C) 2019 Jacques Le Clerc.
29 Copyright (C) 2019 luzpaz.
30 Copyright (C) 2019-2022 Philippe Weyland.
31 Copyright (C) 2020-2021, 2023, 2025-2026 Aurélien PIERRE.
32 Copyright (C) 2020 Chris Elston.
33 Copyright (C) 2020 JP Verrue.
34 Copyright (C) 2020 Matthieu Volat.
35 Copyright (C) 2020 U-DESKTOP-HQME86J\marco.
36 Copyright (C) 2021 Daniel Vogelbacher.
37 Copyright (C) 2021 Miloš Komarčević.
38 Copyright (C) 2021 Ralf Brown.
39 Copyright (C) 2022 HansBull.
40 Copyright (C) 2022 Martin Bařinka.
41 Copyright (C) 2022 paolodepetrillo.
42 Copyright (C) 2023, 2025 Alynx Zhou.
43 Copyright (C) 2023 Ricky Moon.
44 Copyright (C) 2024-2025 Guillaume Stutin.
45
46 darktable is free software: you can redistribute it and/or modify
47 it under the terms of the GNU General Public License as published by
48 the Free Software Foundation, either version 3 of the License, or
49 (at your option) any later version.
50
51 darktable is distributed in the hope that it will be useful,
52 but WITHOUT ANY WARRANTY; without even the implied warranty of
53 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54 GNU General Public License for more details.
55
56 You should have received a copy of the GNU General Public License
57 along with darktable. If not, see <http://www.gnu.org/licenses/>.
58*/
59
60#pragma once
61
62#ifdef HAVE_CONFIG_H
63#include "config.h"
64#endif
65
66#include "common/colorspaces.h"
67#include "common/dtpthread.h"
68#include "develop/format.h"
69#include <glib.h>
70#include <inttypes.h>
71
72#ifdef __cplusplus
73extern "C" {
74#endif
75
78{
79 DT_IMAGEIO_OK = 0, // all good :)
80 DT_IMAGEIO_FILE_NOT_FOUND, // file has been lost
81 DT_IMAGEIO_FILE_CORRUPTED, // file contains garbage
82 DT_IMAGEIO_CACHE_FULL, // dt's caches are full :(
83 DT_IMAGEIO_UNSUPPORTED_FORMAT, // file format not supported by loader
84 DT_IMAGEIO_UNSUPPORTED_FEATURE, // format supported but uses unsupported feature
85 DT_IMAGEIO_UNSUPPORTED_CAMERA, // camera model not supported by loader
86 DT_IMAGEIO_LOAD_FAILED, // internal loader failure
87 DT_IMAGEIO_IOERROR // I/O error while reading file
89
90typedef enum
91{
92 // the first 0x7 in flags are reserved for star ratings.
93 // see view.h:
94 // DT_VIEW_DESERT = 0,
95 // DT_VIEW_STAR_1 = 1,
96 // DT_VIEW_STAR_2 = 2,
97 // DT_VIEW_STAR_3 = 3,
98 // DT_VIEW_STAR_4 = 4,
99 // DT_VIEW_STAR_5 = 5,
101
102 // next field unused, but it used to be.
103 // old DB entries might have it set.
104 // To reuse : force to 0 in DB loading and force to 0 in DB saving
105 // Use it to store a state that doesn't need to go in DB
107 // set during import if the image is low-dynamic range, i.e. doesn't need demosaic, wb, highlight clipping
108 // etc.
109 DT_IMAGE_LDR = 1 << 5,
110 // set during import if the image is raw data, i.e. it needs demosaicing.
111 DT_IMAGE_RAW = 1 << 6,
112 // set during import if images is a high-dynamic range image..
113 DT_IMAGE_HDR = 1 << 7,
114 // set when marked for deletion
116 // set when auto-applying presets have been applied to this image.
118 // legacy flag. is set for all new images. i hate to waste a bit on this :(
120 // local copy status
122 // image has an associated .txt file for overlay
124 // image has an associated wav file
126 // image is a bayer pattern with 4 colors (e.g., CYGM or RGBE)
128 // image was detected as monochrome
130 // DNG image has exif tags which are not cached in the database but must be read and stored in dt_image_t
131 // when the image is loaded.
133 // image is an sraw
134 DT_IMAGE_S_RAW = 1 << 17,
135 // image has a monochrome preview tested
137 // image has been set to monochrome via demosaic module
139 // image has a flag set to use the monochrome workflow in the modules supporting it
142
149
151{
152 unsigned legacy : 24;
153 unsigned user_flip : 8; // +8 = 32 bits.
155
167
185
206
214
215static const struct
216{
217 const char *tooltip;
218 const char flag;
220{
221 { N_("unknown"), '.'}, // EMPTY_FIELD
222 { N_("tiff"), 't'},
223 { N_("png"), 'p'},
224 { N_("j2k"), 'J'},
225 { N_("jpeg"), 'j'},
226 { N_("exr"), 'e'},
227 { N_("rgbe"), 'R'},
228 { N_("pfm"), 'P'},
229 { N_("GraphicsMagick"), 'g'},
230 { N_("rawspeed"), 'r'},
231 { N_("netpnm"), 'n'},
232 { N_("avif"), 'a'},
233 { N_("ImageMagick"), 'i'},
234 { N_("heif"), 'h'},
235 { N_("libraw"), 'l'},
236 { N_("webp"), 'w'}
238
243
244struct dt_cache_entry_t;
245
246typedef struct dt_image_t
247{
248 // minimal exif data here (all in multiples of 4-byte to interface nicely with c++):
249 int32_t exif_inited;
254 float exif_iso;
258 char exif_maker[64];
259 char exif_model[64];
260 char exif_lens[128];
262
263 char camera_maker[64];
264 char camera_model[64];
265 char camera_alias[64];
269
276 char datetime[200];
277
278 // common stuff
279
280 // to understand this, look at comment for dt_histogram_roi_t
283
284 // used by library
291
292 //timestamps
294
296
298
299 float d65_color_matrix[9]; // the 3x3 matrix embedded in some DNGs
300 uint8_t *profile; // embedded profile, for example from JPEGs
301 uint32_t profile_size;
302 dt_image_colorspace_t colorspace; // the colorspace that is specified in exif. mostly used for jpeg files
303
304 dt_image_raw_parameters_t legacy_flip; // unfortunately needed to convert old bits to new flip module.
305
306 /* gps coords */
308
309 /* needed in exposure iop for Deflicker */
313
314 /* needed to fix some manufacturers madness */
317
318 /* White balance coeffs from the raw */
319 dt_aligned_pixel_t wb_coeffs;
320
321 /* Adobe coeffs from the raw */
322 float adobe_XYZ_to_CAM[4][3];
323
324 /* DefaultUserCrop */
326
327 /* GainMaps from DNG OpcodeList2 exif tag */
329
330 /* Color labels */
333
335 gboolean has_audio;
336 gboolean is_bw;
337 gboolean is_bw_flow;
338 gboolean is_hdr;
339
340 /* convenience pointer back into the image cache, so we can return dt_image_t* there directly. */
343
344// image buffer operations:
346void dt_image_init(dt_image_t *img);
350int dt_image_is_ldr(const dt_image_t *img);
352int dt_image_is_raw(const dt_image_t *img);
354int dt_image_is_hdr(const dt_image_t *img);
356void dt_image_set_monochrome_flag(const int32_t imgid, gboolean monochrome);
358gboolean dt_image_is_monochrome(const dt_image_t *img);
368void dt_image_print_debug_info(const dt_image_t *img, const char *context);
371void dt_image_full_path(const int32_t imgid, char *pathname, size_t pathname_len, gboolean *from_cache, const char *calling_func);
373void dt_image_local_copy_paths_from_fullpath(const char *fullpath, int32_t imgid, char *local_copy_path,
374 size_t local_copy_len, char *local_copy_legacy_path,
375 size_t local_copy_legacy_len);
378 size_t pathname_len, gboolean force_cache);
380void dt_image_film_roll_directory(const dt_image_t *img, char *pathname, size_t pathname_len);
382const char *dt_image_film_roll_name(const char *path);
384void dt_image_film_roll(const dt_image_t *img, char *pathname, size_t pathname_len);
386void dt_image_path_append_version_no_db(int version, char *pathname, size_t pathname_len);
388void dt_image_path_append_version(const int32_t imgid, char *pathname, size_t pathname_len);
390void dt_image_print_exif(const dt_image_t *img, char *line, size_t line_len);
391/* set rating to img flags */
392void dt_image_set_xmp_rating(dt_image_t *img, const int rating);
393/* get rating from img flags */
394int dt_image_get_xmp_rating(const dt_image_t *img);
397GList* dt_image_find_xmps(const char* filename);
399int32_t dt_image_get_id_full_path(const gchar *filename);
401int32_t dt_image_get_id(int32_t film_id, const gchar *filename);
403int32_t dt_image_import(int32_t film_id, const char *filename, gboolean raise_signals);
405int32_t dt_image_import_lua(int32_t film_id, const char *filename);
407void dt_image_remove(const int32_t imgid);
411int32_t dt_image_duplicate_with_version(const int32_t imgid, const int32_t newversion);
413int32_t dt_image_duplicate(const int32_t imgid);
415void dt_image_flip(const int32_t imgid, const int32_t cw);
416void dt_image_set_flip(const int32_t imgid, const dt_image_orientation_t user_flip);
419void dt_image_set_location(const int32_t imgid, const dt_image_geoloc_t *geoloc,
420 const gboolean undo_on, const gboolean group_on);
422void dt_image_set_locations(const GList *img, const dt_image_geoloc_t *geoloc,
423 const gboolean undo_on);
425void dt_image_set_images_locations(const GList *imgs, const GArray *gloc,
426 const gboolean undo_on);
428void dt_image_get_location(const int32_t imgid, dt_image_geoloc_t *geoloc);
430uint32_t dt_image_altered(const int32_t imgid);
432void dt_image_cleanup(void);
433
439
465
468int32_t dt_image_move(const int32_t imgid, const int32_t filmid);
472int32_t dt_image_rename(const int32_t imgid, const int32_t filmid, const gchar *newname);
475int32_t dt_image_copy(const int32_t imgid, const int32_t filmid);
478int32_t dt_image_copy_rename(const int32_t imgid, const int32_t filmid, const gchar *newname);
479int dt_image_local_copy_set(const int32_t imgid);
480int dt_image_local_copy_reset(const int32_t imgid);
481/* check whether it is safe to remove a file */
482gboolean dt_image_safe_remove(const int32_t imgid);
483/* try to sync .xmp for all local copies */
485// xmp functions:
486int dt_image_write_sidecar_file(const int32_t imgid);
487void dt_image_synch_xmp(const int selected);
488void dt_image_synch_xmps(const GList *img);
489void dt_image_synch_all_xmp(const gchar *pathname);
491gboolean dt_image_get_xmp_mode();
492
493// set datetime to exif_datetime_taken field
494void dt_image_set_datetime(const GList *imgs, const char *datetime, const gboolean undo_on);
495// set datetimeS to exif_datetime_taken field
496void dt_image_set_datetimes(const GList *imgs, const GArray *dtime, const gboolean undo_on);
497// return image datetime string into the given buffer (size = DT_DATETIME_LENGTH)
498void dt_image_get_datetime(const int32_t imgid, char *datetime);
499
501char *dt_image_get_audio_path(const int32_t imgid);
502char *dt_image_get_audio_path_from_path(const char *image_path);
504char *dt_image_get_text_path(const int32_t imgid);
505char *dt_image_get_text_path_from_path(const char *image_path);
506char *dt_image_build_text_path_from_path(const char *image_path);
507
508float dt_image_get_exposure_bias(const struct dt_image_t *image_storage);
509
511char *dt_image_camera_missing_sample_message(const struct dt_image_t *img, gboolean logmsg);
514void dt_get_dirname_from_imgid(gchar *dir, const int32_t imgid);
515// Search for duplicate's sidecar files and import them if found and not in DB yet
516int dt_image_read_duplicates(const uint32_t id, const char *filename, const gboolean clear_selection);
517
518#ifdef __cplusplus
519}
520#endif
521
522// clang-format off
523// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
524// vim: shiftwidth=2 expandtab tabstop=2 cindent
525// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
526// clang-format on
gboolean dt_image_is_matrix_correction_supported(const dt_image_t *img)
Definition common/image.c:268
int32_t dt_image_copy_rename(const int32_t imgid, const int32_t filmid, const gchar *newname)
Definition common/image.c:2050
dt_image_colorspace_t
Definition common/image.h:144
@ DT_IMAGE_COLORSPACE_NONE
Definition common/image.h:145
@ DT_IMAGE_COLORSPACE_ADOBE_RGB
Definition common/image.h:147
@ DT_IMAGE_COLORSPACE_SRGB
Definition common/image.h:146
int32_t dt_image_move(const int32_t imgid, const int32_t filmid)
Definition common/image.c:2045
void dt_image_synch_xmps(const GList *img)
Definition common/image.c:2634
char * dt_image_get_audio_path(const int32_t imgid)
Definition common/image.c:2836
dt_image_path_source_t
Definition common/image.h:208
@ DT_IMAGE_PATH_NONE
Definition common/image.h:209
@ DT_IMAGE_PATH_LOCAL_COPY_LEGACY
Definition common/image.h:211
@ DT_IMAGE_PATH_ORIGINAL
Definition common/image.h:212
@ DT_IMAGE_PATH_LOCAL_COPY
Definition common/image.h:210
static dt_image_orientation_t dt_image_orientation_to_flip_bits(const int orient)
Definition common/image.h:441
int dt_image_get_xmp_rating(const dt_image_t *img)
Definition common/image.c:681
void dt_image_set_flip(const int32_t imgid, const dt_image_orientation_t user_flip)
Definition common/image.c:899
void dt_image_check_camera_missing_sample(const struct dt_image_t *img)
Definition common/image.c:3020
dt_image_orientation_t dt_image_get_orientation(const int32_t imgid)
Definition common/image.c:919
void dt_image_path_append_version(const int32_t imgid, char *pathname, size_t pathname_len)
Definition common/image.c:649
int dt_image_write_sidecar_file(const int32_t imgid)
Definition common/image.c:2615
int32_t dt_image_get_id(int32_t film_id, const gchar *filename)
Definition common/image.c:1717
int32_t dt_image_copy(const int32_t imgid, const int32_t filmid)
Definition common/image.c:2309
void dt_image_refresh_makermodel(dt_image_t *img)
Definition common/image.c:1825
int dt_image_monochrome_flags(const dt_image_t *img)
Definition common/image.c:291
uint32_t dt_image_altered(const int32_t imgid)
Definition common/image.c:1233
int dt_image_is_ldr(const dt_image_t *img)
Definition common/image.c:165
void dt_image_get_datetime(const int32_t imgid, char *datetime)
Definition common/image.c:2713
char * dt_image_get_text_path_from_path(const char *image_path)
Definition common/image.c:2882
void dt_image_set_location(const int32_t imgid, const dt_image_geoloc_t *geoloc, const gboolean undo_on, const gboolean group_on)
Definition common/image.c:846
void dt_image_film_roll(const dt_image_t *img, char *pathname, size_t pathname_len)
Definition common/image.c:443
dt_image_orientation_t
Definition common/image.h:169
@ ORIENTATION_TRANSVERSE
Definition common/image.h:183
@ ORIENTATION_SWAP_XY
Definition common/image.h:174
@ ORIENTATION_FLIP_Y
Definition common/image.h:172
@ ORIENTATION_ROTATE_CCW_90_DEG
Definition common/image.h:181
@ ORIENTATION_NULL
Definition common/image.h:170
@ ORIENTATION_ROTATE_CW_90_DEG
Definition common/image.h:182
@ ORIENTATION_NONE
Definition common/image.h:171
@ ORIENTATION_FLIP_X
Definition common/image.h:173
@ ORIENTATION_TRANSPOSE
Definition common/image.h:180
@ ORIENTATION_ROTATE_180_DEG
Definition common/image.h:179
@ ORIENTATION_FLIP_VERTICALLY
Definition common/image.h:178
@ ORIENTATION_FLIP_HORIZONTALLY
Definition common/image.h:177
void dt_image_print_exif(const dt_image_t *img, char *line, size_t line_len)
Definition common/image.c:664
void dt_image_synch_all_xmp(const gchar *pathname)
Definition common/image.c:2661
void dt_image_get_location(const int32_t imgid, dt_image_geoloc_t *geoloc)
Definition common/image.c:705
const char flag
Definition common/image.h:218
int32_t dt_image_duplicate_with_version(const int32_t imgid, const int32_t newversion)
Definition common/image.c:1198
gboolean dt_image_is_monochrome(const dt_image_t *img)
Definition common/image.c:197
dt_imageio_retval_t
Definition common/image.h:78
@ DT_IMAGEIO_LOAD_FAILED
Definition common/image.h:86
@ DT_IMAGEIO_OK
Definition common/image.h:79
@ DT_IMAGEIO_CACHE_FULL
Definition common/image.h:82
@ DT_IMAGEIO_UNSUPPORTED_FEATURE
Definition common/image.h:84
@ DT_IMAGEIO_FILE_CORRUPTED
Definition common/image.h:81
@ DT_IMAGEIO_UNSUPPORTED_FORMAT
Definition common/image.h:83
@ DT_IMAGEIO_IOERROR
Definition common/image.h:87
@ DT_IMAGEIO_FILE_NOT_FOUND
Definition common/image.h:80
@ DT_IMAGEIO_UNSUPPORTED_CAMERA
Definition common/image.h:85
void dt_image_print_debug_info(const dt_image_t *img, const char *context)
Definition common/image.c:326
const char * tooltip
Definition common/image.h:217
void dt_image_init(dt_image_t *img)
Definition common/image.c:1741
int32_t dt_image_import(int32_t film_id, const char *filename, gboolean raise_signals)
Definition common/image.c:1731
void dt_image_set_datetimes(const GList *imgs, const GArray *dtime, const gboolean undo_on)
Definition common/image.c:2760
const char * dt_image_film_roll_name(const char *path)
Definition common/image.c:402
float dt_image_get_exposure_bias(const struct dt_image_t *image_storage)
Definition common/image.c:2975
GList * dt_image_find_xmps(const char *filename)
Definition common/image.c:1286
void dt_image_set_datetime(const GList *imgs, const char *datetime, const gboolean undo_on)
Definition common/image.c:2797
dt_exif_image_orientation_t
Definition common/image.h:157
@ EXIF_ORIENTATION_NONE
Definition common/image.h:158
@ EXIF_ORIENTATION_TRANSPOSE
Definition common/image.h:162
@ EXIF_ORIENTATION_ROTATE_180_DEG
Definition common/image.h:161
@ EXIF_ORIENTATION_FLIP_VERTICALLY
Definition common/image.h:160
@ EXIF_ORIENTATION_ROTATE_CW_90_DEG
Definition common/image.h:164
@ EXIF_ORIENTATION_TRANSVERSE
Definition common/image.h:165
@ EXIF_ORIENTATION_ROTATE_CCW_90_DEG
Definition common/image.h:163
@ EXIF_ORIENTATION_FLIP_HORIZONTALLY
Definition common/image.h:159
dt_image_flags_t
Definition common/image.h:91
@ DT_IMAGE_NO_LEGACY_PRESETS
Definition common/image.h:119
@ DT_IMAGE_HAS_ADDITIONAL_DNG_TAGS
Definition common/image.h:132
@ DT_IMAGE_HAS_WAV
Definition common/image.h:125
@ DT_IMAGE_AUTO_PRESETS_APPLIED
Definition common/image.h:117
@ DT_IMAGE_S_RAW
Definition common/image.h:134
@ DT_IMAGE_REMOVE
Definition common/image.h:115
@ DT_IMAGE_MONOCHROME_BAYER
Definition common/image.h:138
@ DT_IMAGE_LOCAL_COPY
Definition common/image.h:121
@ DT_IMAGE_RAW
Definition common/image.h:111
@ DT_IMAGE_REJECTED
Definition common/image.h:100
@ DT_IMAGE_4BAYER
Definition common/image.h:127
@ DT_IMAGE_MONOCHROME_WORKFLOW
Definition common/image.h:140
@ DT_IMAGE_THUMBNAIL_DEPRECATED
Definition common/image.h:106
@ DT_IMAGE_HAS_TXT
Definition common/image.h:123
@ DT_IMAGE_MONOCHROME
Definition common/image.h:129
@ DT_IMAGE_HDR
Definition common/image.h:113
@ DT_IMAGE_LDR
Definition common/image.h:109
@ DT_IMAGE_MONOCHROME_PREVIEW
Definition common/image.h:136
void dt_image_path_append_version_no_db(int version, char *pathname, size_t pathname_len)
Definition common/image.c:630
void dt_image_set_monochrome_flag(const int32_t imgid, gboolean monochrome)
Definition common/image.c:247
void dt_image_set_images_locations(const GList *imgs, const GArray *gloc, const gboolean undo_on)
Definition common/image.c:883
char * dt_image_get_audio_path_from_path(const char *image_path)
Definition common/image.c:2813
gboolean dt_image_use_monochrome_workflow(const dt_image_t *img)
Definition common/image.c:285
int dt_image_local_copy_set(const int32_t imgid)
Definition common/image.c:2314
void dt_image_cleanup(void)
Definition common/image.c:1257
void dt_image_film_roll_directory(const dt_image_t *img, char *pathname, size_t pathname_len)
Definition common/image.c:427
dt_image_path_source_t dt_image_choose_input_path(const dt_image_t *img, char *pathname, size_t pathname_len, gboolean force_cache)
Definition common/image.c:514
void dt_image_remove(const int32_t imgid)
Definition common/image.c:1203
char * dt_image_camera_missing_sample_message(const struct dt_image_t *img, gboolean logmsg)
Definition common/image.c:2993
int dt_image_get_xmp_rating_from_flags(const int flags)
Definition common/image.c:674
int32_t dt_image_import_lua(int32_t film_id, const char *filename)
Definition common/image.c:1736
int dt_image_read_duplicates(const uint32_t id, const char *filename, const gboolean clear_selection)
Definition common/image.c:1348
static dt_image_orientation_t dt_image_orientation(const dt_image_t *img)
Definition common/image.h:435
static const struct @7 loaders_info[LOADER_COUNT]
void dt_image_set_locations(const GList *img, const dt_image_geoloc_t *geoloc, const gboolean undo_on)
Definition common/image.c:829
int dt_image_local_copy_reset(const int32_t imgid)
Definition common/image.c:2405
gboolean dt_image_get_xmp_mode()
Definition common/image.c:469
char * dt_image_get_text_path(const int32_t imgid)
Definition common/image.c:2956
int32_t dt_image_get_id_full_path(const gchar *filename)
Definition common/image.c:1692
gboolean dt_image_is_rawprepare_supported(const dt_image_t *img)
Definition common/image.c:280
gboolean dt_image_safe_remove(const int32_t imgid)
Definition common/image.c:491
void dt_image_set_xmp_rating(dt_image_t *img, const int rating)
Definition common/image.c:686
dt_image_loader_t
Definition common/image.h:187
@ LOADER_PFM
Definition common/image.h:195
@ LOADER_AVIF
Definition common/image.h:199
@ LOADER_J2K
Definition common/image.h:191
@ LOADER_PNG
Definition common/image.h:190
@ LOADER_EXR
Definition common/image.h:193
@ LOADER_TIFF
Definition common/image.h:189
@ LOADER_JPEG
Definition common/image.h:192
@ LOADER_WEBP
Definition common/image.h:203
@ LOADER_GM
Definition common/image.h:196
@ LOADER_HEIF
Definition common/image.h:201
@ LOADER_RAWSPEED
Definition common/image.h:197
@ LOADER_PNM
Definition common/image.h:198
@ LOADER_RGBE
Definition common/image.h:194
@ LOADER_LIBRAW
Definition common/image.h:202
@ LOADER_UNKNOWN
Definition common/image.h:188
@ LOADER_COUNT
Definition common/image.h:204
@ LOADER_IM
Definition common/image.h:200
char * dt_image_build_text_path_from_path(const char *image_path)
Definition common/image.c:2889
int dt_image_is_raw(const dt_image_t *img)
Definition common/image.c:192
void dt_image_flip(const int32_t imgid, const int32_t cw)
Definition common/image.c:971
int32_t dt_image_duplicate(const int32_t imgid)
Definition common/image.c:1013
int dt_image_is_hdr(const dt_image_t *img)
Definition common/image.c:176
void dt_image_local_copy_synch()
Definition common/image.c:2676
int32_t dt_image_rename(const int32_t imgid, const int32_t filmid, const gchar *newname)
Definition common/image.c:1843
void dt_image_synch_xmp(const int selected)
Definition common/image.c:2643
void dt_get_dirname_from_imgid(gchar *dir, const int32_t imgid)
Definition common/image.c:3030
void dt_image_full_path(const int32_t imgid, char *pathname, size_t pathname_len, gboolean *from_cache, const char *calling_func)
Get the full path of an image out of the database.
Definition common/image.c:573
void dt_image_local_copy_paths_from_fullpath(const char *fullpath, int32_t imgid, char *local_copy_path, size_t local_copy_len, char *local_copy_legacy_path, size_t local_copy_legacy_len)
Definition common/image.c:603
float dt_boundingbox_t[4]
Definition darktable.h:630
#define DT_MAX_FILENAME_LEN
Definition darktable.h:984
#define PATH_MAX
Definition darktable.h:994
dt_mipmap_buffer_dsc_flags flags
Definition mipmap_cache.c:4
unsigned __int64 uint64_t
Definition strptime.c:74
Definition common/cache.h:33
Definition common/image.h:240
double latitude
Definition common/image.h:241
double elevation
Definition common/image.h:241
double longitude
Definition common/image.h:241
Definition common/image.h:151
unsigned legacy
Definition common/image.h:152
unsigned user_flip
Definition common/image.h:153
Definition common/image.h:247
gboolean has_audio
Definition common/image.h:335
gboolean is_hdr
Definition common/image.h:338
float exif_exposure
Definition common/image.h:251
float pixel_aspect_ratio
Definition common/image.h:316
int32_t height
Definition common/image.h:281
gboolean camera_missing_sample
Definition common/image.h:268
GTimeSpan export_timestamp
Definition common/image.h:293
uint64_t history_hash
Definition common/image.h:288
char camera_model[64]
Definition common/image.h:264
float exif_focus_distance
Definition common/image.h:256
dt_boundingbox_t usercrop
Definition common/image.h:325
GTimeSpan import_timestamp
Definition common/image.h:293
gboolean is_bw
Definition common/image.h:336
int32_t group_id
Definition common/image.h:285
char camera_makermodel[128]
Definition common/image.h:266
float exif_exposure_bias
Definition common/image.h:252
uint16_t raw_black_level
Definition common/image.h:310
float exif_iso
Definition common/image.h:254
GList * dng_gain_maps
Definition common/image.h:328
dt_image_loader_t loader
Definition common/image.h:295
char camera_maker[64]
Definition common/image.h:263
uint32_t raw_white_point
Definition common/image.h:312
int32_t exif_inited
Definition common/image.h:249
float exif_aperture
Definition common/image.h:253
int32_t version
Definition common/image.h:285
int32_t crop_height
Definition common/image.h:282
uint64_t mipmap_hash
Definition common/image.h:289
char fullpath[PATH_MAX]
Definition common/image.h:271
dt_image_geoloc_t geoloc
Definition common/image.h:307
char camera_legacy_makermodel[128]
Definition common/image.h:267
int32_t flags
Definition common/image.h:285
dt_image_orientation_t orientation
Definition common/image.h:250
int32_t width
Definition common/image.h:281
float exif_focal_length
Definition common/image.h:255
char exif_maker[64]
Definition common/image.h:258
GTimeSpan change_timestamp
Definition common/image.h:293
uint32_t profile_size
Definition common/image.h:301
int32_t crop_y
Definition common/image.h:282
uint32_t history_items
Definition common/image.h:287
int rating
Definition common/image.h:332
gboolean has_localcopy
Definition common/image.h:334
int32_t num
Definition common/image.h:285
char camera_alias[64]
Definition common/image.h:265
char exif_lens[128]
Definition common/image.h:260
char local_copy_path[PATH_MAX]
Definition common/image.h:272
GTimeSpan print_timestamp
Definition common/image.h:293
int32_t film_id
Definition common/image.h:285
GTimeSpan exif_datetime_taken
Definition common/image.h:261
int32_t crop_x
Definition common/image.h:282
int color_labels
Definition common/image.h:331
float d65_color_matrix[9]
Definition common/image.h:299
int32_t p_height
Definition common/image.h:281
dt_iop_buffer_dsc_t dsc
Definition common/image.h:297
int32_t p_width
Definition common/image.h:281
char exif_model[64]
Definition common/image.h:259
dt_image_colorspace_t colorspace
Definition common/image.h:302
float adobe_XYZ_to_CAM[4][3]
Definition common/image.h:322
uint8_t * profile
Definition common/image.h:300
char datetime[200]
Definition common/image.h:276
struct dt_cache_entry_t * cache_entry
Definition common/image.h:341
int32_t crop_width
Definition common/image.h:282
uint32_t group_members
Definition common/image.h:286
dt_image_raw_parameters_t legacy_flip
Definition common/image.h:304
char filename[DT_MAX_FILENAME_LEN]
Definition common/image.h:270
char folder[PATH_MAX]
Definition common/image.h:274
int32_t id
Definition common/image.h:285
uint16_t raw_black_level_separate[4]
Definition common/image.h:311
char filmroll[PATH_MAX]
Definition common/image.h:275
uint64_t self_hash
Definition common/image.h:290
char local_copy_legacy_path[PATH_MAX]
Definition common/image.h:273
dt_aligned_pixel_t wb_coeffs
Definition common/image.h:319
float exif_crop
Definition common/image.h:257
uint32_t fuji_rotation_pos
Definition common/image.h:315
gboolean is_bw_flow
Definition common/image.h:337
Definition develop/format.h:48