Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
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
289
290 // mipmap_hash is stored in database as an attempt to record the validity
291 // of thumbnails stored on the disk cache. But it is actually unusable until we
292 // have one hash per mipmap size. So it's not implemented anywhere for now.
293 // Saving all hashes for all mipmap sizes will change the database structure and
294 // loose compatibility.
297
298 //timestamps
300
302
304
305 float d65_color_matrix[9]; // the 3x3 matrix embedded in some DNGs
306 uint8_t *profile; // embedded profile, for example from JPEGs
307 uint32_t profile_size;
308 dt_image_colorspace_t colorspace; // the colorspace that is specified in exif. mostly used for jpeg files
309
310 dt_image_raw_parameters_t legacy_flip; // unfortunately needed to convert old bits to new flip module.
311
312 /* gps coords */
314
315 /* needed in exposure iop for Deflicker */
319
320 /* needed to fix some manufacturers madness */
323
324 /* White balance coeffs from the raw */
326
327 /* Adobe coeffs from the raw */
328 float adobe_XYZ_to_CAM[4][3];
329
330 /* DefaultUserCrop */
332
333 /* GainMaps from DNG OpcodeList2 exif tag */
335
336 /* Color labels */
339
341 gboolean has_audio;
342 gboolean is_bw;
343 gboolean is_bw_flow;
344 gboolean is_hdr;
345
346 /* convenience pointer back into the image cache, so we can return dt_image_t* there directly. */
349
350// image buffer operations:
352void dt_image_init(dt_image_t *img);
356int dt_image_is_ldr(const dt_image_t *img);
358int dt_image_is_raw(const dt_image_t *img);
360int dt_image_is_hdr(const dt_image_t *img);
362void dt_image_set_monochrome_flag(const int32_t imgid, gboolean monochrome);
364gboolean dt_image_is_monochrome(const dt_image_t *img);
374void dt_image_print_debug_info(const dt_image_t *img, const char *context);
377void dt_image_full_path(const int32_t imgid, char *pathname, size_t pathname_len, gboolean *from_cache, const char *calling_func);
379void dt_image_local_copy_paths_from_fullpath(const char *fullpath, int32_t imgid, char *local_copy_path,
380 size_t local_copy_len, char *local_copy_legacy_path,
381 size_t local_copy_legacy_len);
384 size_t pathname_len, gboolean force_cache);
386void dt_image_film_roll_directory(const dt_image_t *img, char *pathname, size_t pathname_len);
388const char *dt_image_film_roll_name(const char *path);
390void dt_image_film_roll(const dt_image_t *img, char *pathname, size_t pathname_len);
392void dt_image_path_append_version_no_db(int version, char *pathname, size_t pathname_len);
394void dt_image_path_append_version(const int32_t imgid, char *pathname, size_t pathname_len);
396void dt_image_print_exif(const dt_image_t *img, char *line, size_t line_len);
397/* set rating to img flags */
398void dt_image_set_xmp_rating(dt_image_t *img, const int rating);
399/* get rating from img flags */
400int dt_image_get_xmp_rating(const dt_image_t *img);
403GList* dt_image_find_xmps(const char* filename);
405int32_t dt_image_get_id_full_path(const gchar *filename);
407int32_t dt_image_get_id(int32_t film_id, const gchar *filename);
409int32_t dt_image_import(int32_t film_id, const char *filename, gboolean raise_signals);
411int32_t dt_image_import_lua(int32_t film_id, const char *filename);
413void dt_image_remove(const int32_t imgid);
417int32_t dt_image_duplicate_with_version(const int32_t imgid, const int32_t newversion);
419int32_t dt_image_duplicate(const int32_t imgid);
421void dt_image_flip(const int32_t imgid, const int32_t cw);
422void dt_image_set_flip(const int32_t imgid, const dt_image_orientation_t user_flip);
425void dt_image_set_location(const int32_t imgid, const dt_image_geoloc_t *geoloc,
426 const gboolean undo_on, const gboolean group_on);
428void dt_image_set_locations(const GList *img, const dt_image_geoloc_t *geoloc,
429 const gboolean undo_on);
431void dt_image_set_images_locations(const GList *imgs, const GArray *gloc,
432 const gboolean undo_on);
434void dt_image_get_location(const int32_t imgid, dt_image_geoloc_t *geoloc);
436uint32_t dt_image_altered(const int32_t imgid);
438void dt_image_cleanup(void);
439
445
471
474int32_t dt_image_move(const int32_t imgid, const int32_t filmid);
478int32_t dt_image_rename(const int32_t imgid, const int32_t filmid, const gchar *newname);
481int32_t dt_image_copy(const int32_t imgid, const int32_t filmid);
484int32_t dt_image_copy_rename(const int32_t imgid, const int32_t filmid, const gchar *newname);
485int dt_image_local_copy_set(const int32_t imgid);
486int dt_image_local_copy_reset(const int32_t imgid);
487/* check whether it is safe to remove a file */
488gboolean dt_image_safe_remove(const int32_t imgid);
489/* try to sync .xmp for all local copies */
491// xmp functions:
492int dt_image_write_sidecar_file(const int32_t imgid);
493void dt_image_synch_xmp(const int selected);
494void dt_image_synch_xmps(const GList *img);
495void dt_image_synch_all_xmp(const gchar *pathname);
497gboolean dt_image_get_xmp_mode();
498
499// set datetime to exif_datetime_taken field
500void dt_image_set_datetime(const GList *imgs, const char *datetime, const gboolean undo_on);
501// set datetimeS to exif_datetime_taken field
502void dt_image_set_datetimes(const GList *imgs, const GArray *dtime, const gboolean undo_on);
503// return image datetime string into the given buffer (size = DT_DATETIME_LENGTH)
504void dt_image_get_datetime(const int32_t imgid, char *datetime);
505
507char *dt_image_get_audio_path(const int32_t imgid);
508char *dt_image_get_audio_path_from_path(const char *image_path);
510char *dt_image_get_text_path(const int32_t imgid);
511char *dt_image_get_text_path_from_path(const char *image_path);
512char *dt_image_build_text_path_from_path(const char *image_path);
513
514float dt_image_get_exposure_bias(const struct dt_image_t *image_storage);
515
517char *dt_image_camera_missing_sample_message(const struct dt_image_t *img, gboolean logmsg);
520void dt_get_dirname_from_imgid(gchar *dir, const int32_t imgid);
521// Search for duplicate's sidecar files and import them if found and not in DB yet
522int dt_image_read_duplicates(const uint32_t id, const char *filename, const gboolean clear_selection);
523
524#ifdef __cplusplus
525}
526#endif
527
528// clang-format off
529// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
530// vim: shiftwidth=2 expandtab tabstop=2 cindent
531// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
532// clang-format on
float dt_boundingbox_t[4]
Definition darktable.h:709
#define DT_MAX_FILENAME_LEN
Definition darktable.h:1051
#define PATH_MAX
Definition darktable.h:1061
gboolean dt_image_is_matrix_correction_supported(const dt_image_t *img)
Definition common/image.c:265
int32_t dt_image_copy_rename(const int32_t imgid, const int32_t filmid, const gchar *newname)
Definition common/image.c:2033
dt_image_colorspace_t
Definition image.h:144
@ DT_IMAGE_COLORSPACE_NONE
Definition image.h:145
@ DT_IMAGE_COLORSPACE_ADOBE_RGB
Definition image.h:147
@ DT_IMAGE_COLORSPACE_SRGB
Definition image.h:146
int32_t dt_image_move(const int32_t imgid, const int32_t filmid)
Definition common/image.c:2028
void dt_image_synch_xmps(const GList *img)
Definition common/image.c:2617
char * dt_image_get_audio_path(const int32_t imgid)
Definition common/image.c:2819
dt_image_path_source_t
Definition image.h:208
@ DT_IMAGE_PATH_NONE
Definition image.h:209
@ DT_IMAGE_PATH_LOCAL_COPY_LEGACY
Definition image.h:211
@ DT_IMAGE_PATH_ORIGINAL
Definition image.h:212
@ DT_IMAGE_PATH_LOCAL_COPY
Definition image.h:210
static dt_image_orientation_t dt_image_orientation_to_flip_bits(const int orient)
Definition image.h:447
int dt_image_get_xmp_rating(const dt_image_t *img)
Definition common/image.c:678
void dt_image_set_flip(const int32_t imgid, const dt_image_orientation_t user_flip)
Definition common/image.c:896
void dt_image_check_camera_missing_sample(const struct dt_image_t *img)
Definition common/image.c:3001
dt_image_orientation_t dt_image_get_orientation(const int32_t imgid)
Definition common/image.c:916
void dt_image_path_append_version(const int32_t imgid, char *pathname, size_t pathname_len)
Definition common/image.c:646
int dt_image_write_sidecar_file(const int32_t imgid)
Definition common/image.c:2598
int32_t dt_image_get_id(int32_t film_id, const gchar *filename)
Definition common/image.c:1700
int32_t dt_image_copy(const int32_t imgid, const int32_t filmid)
Definition common/image.c:2292
void dt_image_refresh_makermodel(dt_image_t *img)
Definition common/image.c:1808
int dt_image_monochrome_flags(const dt_image_t *img)
Definition common/image.c:288
uint32_t dt_image_altered(const int32_t imgid)
Definition common/image.c:1230
int dt_image_is_ldr(const dt_image_t *img)
Definition common/image.c:162
void dt_image_get_datetime(const int32_t imgid, char *datetime)
Definition common/image.c:2696
char * dt_image_get_text_path_from_path(const char *image_path)
Definition common/image.c:2865
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:843
void dt_image_film_roll(const dt_image_t *img, char *pathname, size_t pathname_len)
Definition common/image.c:440
dt_image_orientation_t
Definition image.h:169
@ ORIENTATION_TRANSVERSE
Definition image.h:183
@ ORIENTATION_SWAP_XY
Definition image.h:174
@ ORIENTATION_FLIP_Y
Definition image.h:172
@ ORIENTATION_ROTATE_CCW_90_DEG
Definition image.h:181
@ ORIENTATION_NULL
Definition image.h:170
@ ORIENTATION_ROTATE_CW_90_DEG
Definition image.h:182
@ ORIENTATION_NONE
Definition image.h:171
@ ORIENTATION_FLIP_X
Definition image.h:173
@ ORIENTATION_TRANSPOSE
Definition image.h:180
@ ORIENTATION_ROTATE_180_DEG
Definition image.h:179
@ ORIENTATION_FLIP_VERTICALLY
Definition image.h:178
@ ORIENTATION_FLIP_HORIZONTALLY
Definition image.h:177
void dt_image_print_exif(const dt_image_t *img, char *line, size_t line_len)
Definition common/image.c:661
void dt_image_synch_all_xmp(const gchar *pathname)
Definition common/image.c:2644
void dt_image_get_location(const int32_t imgid, dt_image_geoloc_t *geoloc)
Definition common/image.c:702
const char flag
Definition image.h:218
int32_t dt_image_duplicate_with_version(const int32_t imgid, const int32_t newversion)
Definition common/image.c:1195
gboolean dt_image_is_monochrome(const dt_image_t *img)
Definition common/image.c:194
dt_imageio_retval_t
Definition image.h:78
@ DT_IMAGEIO_LOAD_FAILED
Definition image.h:86
@ DT_IMAGEIO_OK
Definition image.h:79
@ DT_IMAGEIO_CACHE_FULL
Definition image.h:82
@ DT_IMAGEIO_UNSUPPORTED_FEATURE
Definition image.h:84
@ DT_IMAGEIO_FILE_CORRUPTED
Definition image.h:81
@ DT_IMAGEIO_UNSUPPORTED_FORMAT
Definition image.h:83
@ DT_IMAGEIO_IOERROR
Definition image.h:87
@ DT_IMAGEIO_FILE_NOT_FOUND
Definition image.h:80
@ DT_IMAGEIO_UNSUPPORTED_CAMERA
Definition image.h:85
void dt_image_print_debug_info(const dt_image_t *img, const char *context)
Definition common/image.c:323
const char * tooltip
Definition image.h:217
void dt_image_init(dt_image_t *img)
Definition common/image.c:1724
int32_t dt_image_import(int32_t film_id, const char *filename, gboolean raise_signals)
Definition common/image.c:1714
void dt_image_set_datetimes(const GList *imgs, const GArray *dtime, const gboolean undo_on)
Definition common/image.c:2743
const char * dt_image_film_roll_name(const char *path)
Definition common/image.c:399
float dt_image_get_exposure_bias(const struct dt_image_t *image_storage)
Definition common/image.c:2958
GList * dt_image_find_xmps(const char *filename)
Definition common/image.c:1283
void dt_image_set_datetime(const GList *imgs, const char *datetime, const gboolean undo_on)
Definition common/image.c:2780
dt_exif_image_orientation_t
Definition image.h:157
@ EXIF_ORIENTATION_NONE
Definition image.h:158
@ EXIF_ORIENTATION_TRANSPOSE
Definition image.h:162
@ EXIF_ORIENTATION_ROTATE_180_DEG
Definition image.h:161
@ EXIF_ORIENTATION_FLIP_VERTICALLY
Definition image.h:160
@ EXIF_ORIENTATION_ROTATE_CW_90_DEG
Definition image.h:164
@ EXIF_ORIENTATION_TRANSVERSE
Definition image.h:165
@ EXIF_ORIENTATION_ROTATE_CCW_90_DEG
Definition image.h:163
@ EXIF_ORIENTATION_FLIP_HORIZONTALLY
Definition image.h:159
dt_image_flags_t
Definition image.h:91
@ DT_IMAGE_NO_LEGACY_PRESETS
Definition image.h:119
@ DT_IMAGE_HAS_ADDITIONAL_DNG_TAGS
Definition image.h:132
@ DT_IMAGE_HAS_WAV
Definition image.h:125
@ DT_IMAGE_AUTO_PRESETS_APPLIED
Definition image.h:117
@ DT_IMAGE_S_RAW
Definition image.h:134
@ DT_IMAGE_REMOVE
Definition image.h:115
@ DT_IMAGE_MONOCHROME_BAYER
Definition image.h:138
@ DT_IMAGE_LOCAL_COPY
Definition image.h:121
@ DT_IMAGE_RAW
Definition image.h:111
@ DT_IMAGE_REJECTED
Definition image.h:100
@ DT_IMAGE_4BAYER
Definition image.h:127
@ DT_IMAGE_MONOCHROME_WORKFLOW
Definition image.h:140
@ DT_IMAGE_THUMBNAIL_DEPRECATED
Definition image.h:106
@ DT_IMAGE_HAS_TXT
Definition image.h:123
@ DT_IMAGE_MONOCHROME
Definition image.h:129
@ DT_IMAGE_HDR
Definition image.h:113
@ DT_IMAGE_LDR
Definition image.h:109
@ DT_IMAGE_MONOCHROME_PREVIEW
Definition image.h:136
void dt_image_path_append_version_no_db(int version, char *pathname, size_t pathname_len)
Definition common/image.c:627
void dt_image_set_monochrome_flag(const int32_t imgid, gboolean monochrome)
Definition common/image.c:244
void dt_image_set_images_locations(const GList *imgs, const GArray *gloc, const gboolean undo_on)
Definition common/image.c:880
char * dt_image_get_audio_path_from_path(const char *image_path)
Definition common/image.c:2796
gboolean dt_image_use_monochrome_workflow(const dt_image_t *img)
Definition common/image.c:282
int dt_image_local_copy_set(const int32_t imgid)
Definition common/image.c:2297
void dt_image_cleanup(void)
Definition common/image.c:1254
void dt_image_film_roll_directory(const dt_image_t *img, char *pathname, size_t pathname_len)
Definition common/image.c:424
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:511
void dt_image_remove(const int32_t imgid)
Definition common/image.c:1200
char * dt_image_camera_missing_sample_message(const struct dt_image_t *img, gboolean logmsg)
Definition common/image.c:2974
int dt_image_get_xmp_rating_from_flags(const int flags)
Definition common/image.c:671
int32_t dt_image_import_lua(int32_t film_id, const char *filename)
Definition common/image.c:1719
int dt_image_read_duplicates(const uint32_t id, const char *filename, const gboolean clear_selection)
Definition common/image.c:1345
static dt_image_orientation_t dt_image_orientation(const dt_image_t *img)
Definition image.h:441
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:826
int dt_image_local_copy_reset(const int32_t imgid)
Definition common/image.c:2388
gboolean dt_image_get_xmp_mode()
Definition common/image.c:466
char * dt_image_get_text_path(const int32_t imgid)
Definition common/image.c:2939
int32_t dt_image_get_id_full_path(const gchar *filename)
Definition common/image.c:1675
gboolean dt_image_is_rawprepare_supported(const dt_image_t *img)
Definition common/image.c:277
gboolean dt_image_safe_remove(const int32_t imgid)
Definition common/image.c:488
void dt_image_set_xmp_rating(dt_image_t *img, const int rating)
Definition common/image.c:683
dt_image_loader_t
Definition image.h:187
@ LOADER_PFM
Definition image.h:195
@ LOADER_AVIF
Definition image.h:199
@ LOADER_J2K
Definition image.h:191
@ LOADER_PNG
Definition image.h:190
@ LOADER_EXR
Definition image.h:193
@ LOADER_TIFF
Definition image.h:189
@ LOADER_JPEG
Definition image.h:192
@ LOADER_WEBP
Definition image.h:203
@ LOADER_GM
Definition image.h:196
@ LOADER_HEIF
Definition image.h:201
@ LOADER_RAWSPEED
Definition image.h:197
@ LOADER_PNM
Definition image.h:198
@ LOADER_RGBE
Definition image.h:194
@ LOADER_LIBRAW
Definition image.h:202
@ LOADER_UNKNOWN
Definition image.h:188
@ LOADER_COUNT
Definition image.h:204
@ LOADER_IM
Definition image.h:200
char * dt_image_build_text_path_from_path(const char *image_path)
Definition common/image.c:2872
int dt_image_is_raw(const dt_image_t *img)
Definition common/image.c:189
void dt_image_flip(const int32_t imgid, const int32_t cw)
Definition common/image.c:968
int32_t dt_image_duplicate(const int32_t imgid)
Definition common/image.c:1010
int dt_image_is_hdr(const dt_image_t *img)
Definition common/image.c:173
void dt_image_local_copy_synch()
Definition common/image.c:2659
int32_t dt_image_rename(const int32_t imgid, const int32_t filmid, const gchar *newname)
Definition common/image.c:1826
void dt_image_synch_xmp(const int selected)
Definition common/image.c:2626
void dt_get_dirname_from_imgid(gchar *dir, const int32_t imgid)
Definition common/image.c:3011
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:570
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:600
dt_mipmap_buffer_dsc_flags flags
Definition mipmap_cache.c:4
float dt_aligned_pixel_t[4]
Definition noiseprofile.c:28
unsigned __int64 uint64_t
Definition strptime.c:75
Definition common/cache.h:33
Definition image.h:240
double latitude
Definition image.h:241
double elevation
Definition image.h:241
double longitude
Definition image.h:241
Definition image.h:151
unsigned legacy
Definition image.h:152
unsigned user_flip
Definition image.h:153
Definition image.h:247
gboolean has_audio
Definition image.h:341
gboolean is_hdr
Definition image.h:344
float exif_exposure
Definition image.h:251
float pixel_aspect_ratio
Definition image.h:322
int32_t height
Definition image.h:281
gboolean camera_missing_sample
Definition image.h:268
GTimeSpan export_timestamp
Definition image.h:299
uint64_t history_hash
Definition image.h:288
char camera_model[64]
Definition image.h:264
float exif_focus_distance
Definition image.h:256
dt_boundingbox_t usercrop
Definition image.h:331
GTimeSpan import_timestamp
Definition image.h:299
gboolean is_bw
Definition image.h:342
int32_t group_id
Definition image.h:285
char camera_makermodel[128]
Definition image.h:266
float exif_exposure_bias
Definition image.h:252
uint16_t raw_black_level
Definition image.h:316
float exif_iso
Definition image.h:254
GList * dng_gain_maps
Definition image.h:334
dt_image_loader_t loader
Definition image.h:301
char camera_maker[64]
Definition image.h:263
uint32_t raw_white_point
Definition image.h:318
int32_t exif_inited
Definition image.h:249
float exif_aperture
Definition image.h:253
int32_t version
Definition image.h:285
int32_t crop_height
Definition image.h:282
uint64_t mipmap_hash
Definition image.h:295
char fullpath[PATH_MAX]
Definition image.h:271
dt_image_geoloc_t geoloc
Definition image.h:313
char camera_legacy_makermodel[128]
Definition image.h:267
int32_t flags
Definition image.h:285
dt_image_orientation_t orientation
Definition image.h:250
int32_t width
Definition image.h:281
float exif_focal_length
Definition image.h:255
char exif_maker[64]
Definition image.h:258
GTimeSpan change_timestamp
Definition image.h:299
uint32_t profile_size
Definition image.h:307
int32_t crop_y
Definition image.h:282
uint32_t history_items
Definition image.h:287
int rating
Definition image.h:338
gboolean has_localcopy
Definition image.h:340
int32_t num
Definition image.h:285
char camera_alias[64]
Definition image.h:265
char exif_lens[128]
Definition image.h:260
char local_copy_path[PATH_MAX]
Definition image.h:272
GTimeSpan print_timestamp
Definition image.h:299
int32_t film_id
Definition image.h:285
GTimeSpan exif_datetime_taken
Definition image.h:261
int32_t crop_x
Definition image.h:282
int color_labels
Definition image.h:337
float d65_color_matrix[9]
Definition image.h:305
int32_t p_height
Definition image.h:281
dt_iop_buffer_dsc_t dsc
Definition image.h:303
int32_t p_width
Definition image.h:281
char exif_model[64]
Definition image.h:259
dt_image_colorspace_t colorspace
Definition image.h:308
float adobe_XYZ_to_CAM[4][3]
Definition image.h:328
uint8_t * profile
Definition image.h:306
char datetime[200]
Definition image.h:276
struct dt_cache_entry_t * cache_entry
Definition image.h:347
int32_t crop_width
Definition image.h:282
uint32_t group_members
Definition image.h:286
dt_image_raw_parameters_t legacy_flip
Definition image.h:310
char filename[DT_MAX_FILENAME_LEN]
Definition image.h:270
char folder[PATH_MAX]
Definition image.h:274
int32_t id
Definition image.h:285
uint16_t raw_black_level_separate[4]
Definition image.h:317
char filmroll[PATH_MAX]
Definition image.h:275
uint64_t self_hash
Definition image.h:296
char local_copy_legacy_path[PATH_MAX]
Definition image.h:273
dt_aligned_pixel_t wb_coeffs
Definition image.h:325
float exif_crop
Definition image.h:257
uint32_t fuji_rotation_pos
Definition image.h:321
gboolean is_bw_flow
Definition image.h:343
Definition format.h:52