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
141 // the decoded buffer carries a CFA mosaic (dsc.filters != 0), i.e. it still needs
142 // demosaicing. Set/cleared by dt_image_buffer_resolve_flags() from the decoded buffer
143 // descriptor. This is the bit that separates a mosaiced raw from an already-demosaiced
144 // raw (sRAW / linear DNG), a distinction that otherwise only lives in the dsc.filters
145 // field which is never stored in the database. Persisted to DB through the image cache.
147 // the codec has decoded the file at least once, so the buffer-derived classification
148 // (DT_IMAGE_MOSAIC and the dsc descriptor) is authoritative. Until this bit is set the
149 // pipeline class is only a provisional guess inferred from the filename extension at
150 // import time. Persisted to DB through the image cache.
153
169{
170 DT_IMAGE_PIPE_UNKNOWN = 0, // not yet resolved and the extension gave no hint
171 DT_IMAGE_PIPE_MOSAIC_RAW, // raw colorimetry + CFA mosaic: needs rawprepare AND demosaic
172 DT_IMAGE_PIPE_LINEAR_RAW, // raw colorimetry, already demosaiced (sRAW / linear DNG): rawprepare, no demosaic
173 DT_IMAGE_PIPE_RGB_LDR, // display-referred integer RGB (jpg/png/tiff8...)
174 DT_IMAGE_PIPE_RGB_HDR, // scene/linear float RGB (exr/pfm/hdr/float-tiff)
176
183
185{
186 unsigned legacy : 24;
187 unsigned user_flip : 8; // +8 = 32 bits.
189
201
219
240
248
249static const struct
250{
251 const char *tooltip;
252 const char flag;
254{
255 { N_("unknown"), '.'}, // EMPTY_FIELD
256 { N_("tiff"), 't'},
257 { N_("png"), 'p'},
258 { N_("j2k"), 'J'},
259 { N_("jpeg"), 'j'},
260 { N_("exr"), 'e'},
261 { N_("rgbe"), 'R'},
262 { N_("pfm"), 'P'},
263 { N_("GraphicsMagick"), 'g'},
264 { N_("rawspeed"), 'r'},
265 { N_("netpnm"), 'n'},
266 { N_("avif"), 'a'},
267 { N_("ImageMagick"), 'i'},
268 { N_("heif"), 'h'},
269 { N_("libraw"), 'l'},
270 { N_("webp"), 'w'}
272
277
278struct dt_cache_entry_t;
279
280typedef struct dt_image_t
281{
282 // minimal exif data here (all in multiples of 4-byte to interface nicely with c++):
283 int32_t exif_inited;
288 float exif_iso;
292 char exif_maker[64];
293 char exif_model[64];
294 char exif_lens[128];
296
297 char camera_maker[64];
298 char camera_model[64];
299 char camera_alias[64];
303
310 char datetime[200];
311
312 // common stuff
313
314 // to understand this, look at comment for dt_histogram_roi_t
317
318 // used by library
323
324 // mipmap_hash is stored in database as an attempt to record the validity
325 // of thumbnails stored on the disk cache. But it is actually unusable until we
326 // have one hash per mipmap size. So it's not implemented anywhere for now.
327 // Saving all hashes for all mipmap sizes will change the database structure and
328 // loose compatibility.
331
332 //timestamps
334
336
338
339 float d65_color_matrix[9]; // the 3x3 matrix embedded in some DNGs
340 uint8_t *profile; // embedded profile, for example from JPEGs
341 uint32_t profile_size;
342 dt_image_colorspace_t colorspace; // the colorspace that is specified in exif. mostly used for jpeg files
343
344 dt_image_raw_parameters_t legacy_flip; // unfortunately needed to convert old bits to new flip module.
345
346 /* gps coords */
348
349 /* needed in exposure iop for Deflicker */
353
354 /* needed to fix some manufacturers madness */
357
358 /* White balance coeffs from the raw */
360
361 /* Adobe coeffs from the raw */
362 float adobe_XYZ_to_CAM[4][3];
363
364 /* DefaultUserCrop */
366
367 /* GainMaps from DNG OpcodeList2 exif tag */
369
370 /* Color labels */
373
375 gboolean has_audio;
376 gboolean is_bw;
377 gboolean is_bw_flow;
378 gboolean is_hdr;
379
380 /* convenience pointer back into the image cache, so we can return dt_image_t* there directly. */
383
384// image buffer operations:
386void dt_image_init(dt_image_t *img);
390gboolean dt_image_is_raw(const dt_image_t *img);
394gboolean dt_image_is_ldr(const dt_image_t *img);
398gboolean dt_image_is_hdr(const dt_image_t *img);
399
400/* ------------------------------------------------------------------------------------------
401 * Canonical image-type API.
402 *
403 * Each predicate below tests exactly ONE independent fact about img->flags (no overlapping
404 * conditions, no filename-extension sniffing). The mutually-exclusive classification is
405 * dt_image_pipe_class(); the orthogonal predicates answer the individual "does this image
406 * need stage X" questions used by module auto-enable logic. See src/doc/image-type-detection.md.
407 * ------------------------------------------------------------------------------------------ */
408
417const char *dt_image_pipe_class_name(const dt_image_pipe_class_t klass);
418
421gboolean dt_image_needs_rawprepare(const dt_image_t *img);
423gboolean dt_image_needs_demosaic(const dt_image_t *img);
426gboolean dt_image_is_mosaiced(const dt_image_t *img);
428gboolean dt_image_is_sraw(const dt_image_t *img);
429
440void dt_image_set_monochrome_flag(const int32_t imgid, gboolean monochrome);
442gboolean dt_image_is_monochrome(const dt_image_t *img);
450void dt_image_print_debug_info(const dt_image_t *img, const char *context);
453void dt_image_full_path(const int32_t imgid, char *pathname, size_t pathname_len, gboolean *from_cache, const char *calling_func);
455void dt_image_local_copy_paths_from_fullpath(const char *fullpath, int32_t imgid, char *local_copy_path,
456 size_t local_copy_len, char *local_copy_legacy_path,
457 size_t local_copy_legacy_len);
460 size_t pathname_len, gboolean force_cache);
462void dt_image_film_roll_directory(const dt_image_t *img, char *pathname, size_t pathname_len);
464const char *dt_image_film_roll_name(const char *path);
466void dt_image_film_roll(const dt_image_t *img, char *pathname, size_t pathname_len);
468void dt_image_path_append_version_no_db(int version, char *pathname, size_t pathname_len);
470void dt_image_path_append_version(const int32_t imgid, char *pathname, size_t pathname_len);
472void dt_image_print_exif(const dt_image_t *img, char *line, size_t line_len);
473/* set rating to img flags */
474void dt_image_set_xmp_rating(dt_image_t *img, const int rating);
475/* get rating from img flags */
476int dt_image_get_xmp_rating(const dt_image_t *img);
479GList* dt_image_find_xmps(const char* filename);
481int32_t dt_image_get_id_full_path(const gchar *filename);
483int32_t dt_image_get_id(int32_t film_id, const gchar *filename);
485int32_t dt_image_import(int32_t film_id, const char *filename, gboolean raise_signals);
487int32_t dt_image_import_lua(int32_t film_id, const char *filename);
489void dt_image_remove(const int32_t imgid);
493int32_t dt_image_duplicate_with_version(const int32_t imgid, const int32_t newversion);
495int32_t dt_image_duplicate(const int32_t imgid);
502void dt_image_history_changed(const int32_t imgid, const gboolean refresh_filmstrip);
504void dt_image_flip(const int32_t imgid, const int32_t cw);
505void dt_image_set_flip(const int32_t imgid, const dt_image_orientation_t user_flip);
508void dt_image_set_location(const int32_t imgid, const dt_image_geoloc_t *geoloc,
509 const gboolean undo_on, const gboolean group_on);
511void dt_image_set_locations(const GList *img, const dt_image_geoloc_t *geoloc,
512 const gboolean undo_on);
514void dt_image_set_images_locations(const GList *imgs, const GArray *gloc,
515 const gboolean undo_on);
517void dt_image_get_location(const int32_t imgid, dt_image_geoloc_t *geoloc);
519uint32_t dt_image_altered(const int32_t imgid);
521void dt_image_cleanup(void);
522
528
554
557int32_t dt_image_move(const int32_t imgid, const int32_t filmid);
561int32_t dt_image_rename(const int32_t imgid, const int32_t filmid, const gchar *newname);
564int32_t dt_image_copy(const int32_t imgid, const int32_t filmid);
567int32_t dt_image_copy_rename(const int32_t imgid, const int32_t filmid, const gchar *newname);
568int dt_image_local_copy_set(const int32_t imgid);
569int dt_image_local_copy_reset(const int32_t imgid);
570/* check whether it is safe to remove a file */
571gboolean dt_image_safe_remove(const int32_t imgid);
572/* try to sync .xmp for all local copies */
574// xmp functions:
575int dt_image_write_sidecar_file(const int32_t imgid);
576void dt_image_synch_xmp(const int selected);
577void dt_image_synch_xmps(const GList *img);
578void dt_image_synch_all_xmp(const gchar *pathname);
580gboolean dt_image_get_xmp_mode();
581
582// set datetime to exif_datetime_taken field
583void dt_image_set_datetime(const GList *imgs, const char *datetime, const gboolean undo_on);
584// set datetimeS to exif_datetime_taken field
585void dt_image_set_datetimes(const GList *imgs, const GArray *dtime, const gboolean undo_on);
586// return image datetime string into the given buffer (size = DT_DATETIME_LENGTH)
587void dt_image_get_datetime(const int32_t imgid, char *datetime);
588
590char *dt_image_get_audio_path(const int32_t imgid);
591char *dt_image_get_audio_path_from_path(const char *image_path);
593char *dt_image_get_text_path(const int32_t imgid);
594char *dt_image_get_text_path_from_path(const char *image_path);
595char *dt_image_build_text_path_from_path(const char *image_path);
596
597float dt_image_get_exposure_bias(const struct dt_image_t *image_storage);
598
600char *dt_image_camera_missing_sample_message(const struct dt_image_t *img, gboolean logmsg);
603void dt_get_dirname_from_imgid(gchar *dir, const int32_t imgid);
604// Search for duplicate's sidecar files and import them if found and not in DB yet
605int dt_image_read_duplicates(const uint32_t id, const char *filename, const gboolean clear_selection);
606
607#ifdef __cplusplus
608}
609#endif
610
611// clang-format off
612// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
613// vim: shiftwidth=2 expandtab tabstop=2 cindent
614// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
615// clang-format on
float dt_boundingbox_t[4]
Definition darktable.h:709
#define DT_MAX_FILENAME_LEN
Definition darktable.h:1052
#define PATH_MAX
Definition darktable.h:1062
gboolean dt_image_is_matrix_correction_supported(const dt_image_t *img)
int32_t dt_image_copy_rename(const int32_t imgid, const int32_t filmid, const gchar *newname)
dt_image_colorspace_t
Definition image.h:178
@ DT_IMAGE_COLORSPACE_NONE
Definition image.h:179
@ DT_IMAGE_COLORSPACE_ADOBE_RGB
Definition image.h:181
@ DT_IMAGE_COLORSPACE_SRGB
Definition image.h:180
int32_t dt_image_move(const int32_t imgid, const int32_t filmid)
void dt_image_synch_xmps(const GList *img)
char * dt_image_get_audio_path(const int32_t imgid)
gboolean dt_image_is_raw(const dt_image_t *img)
dt_image_pipe_class_t dt_image_pipe_class(const dt_image_t *img)
dt_image_path_source_t
Definition image.h:242
@ DT_IMAGE_PATH_NONE
Definition image.h:243
@ DT_IMAGE_PATH_LOCAL_COPY_LEGACY
Definition image.h:245
@ DT_IMAGE_PATH_ORIGINAL
Definition image.h:246
@ DT_IMAGE_PATH_LOCAL_COPY
Definition image.h:244
static dt_image_orientation_t dt_image_orientation_to_flip_bits(const int orient)
Definition image.h:530
int dt_image_get_xmp_rating(const dt_image_t *img)
void dt_image_set_flip(const int32_t imgid, const dt_image_orientation_t user_flip)
void dt_image_check_camera_missing_sample(const struct dt_image_t *img)
dt_image_orientation_t dt_image_get_orientation(const int32_t imgid)
void dt_image_path_append_version(const int32_t imgid, char *pathname, size_t pathname_len)
int dt_image_write_sidecar_file(const int32_t imgid)
int32_t dt_image_get_id(int32_t film_id, const gchar *filename)
int32_t dt_image_copy(const int32_t imgid, const int32_t filmid)
void dt_image_refresh_makermodel(dt_image_t *img)
int dt_image_monochrome_flags(const dt_image_t *img)
uint32_t dt_image_altered(const int32_t imgid)
void dt_image_get_datetime(const int32_t imgid, char *datetime)
const char * dt_image_pipe_class_name(const dt_image_pipe_class_t klass)
char * dt_image_get_text_path_from_path(const char *image_path)
void dt_image_set_location(const int32_t imgid, const dt_image_geoloc_t *geoloc, const gboolean undo_on, const gboolean group_on)
void dt_image_film_roll(const dt_image_t *img, char *pathname, size_t pathname_len)
dt_image_orientation_t
Definition image.h:203
@ ORIENTATION_TRANSVERSE
Definition image.h:217
@ ORIENTATION_SWAP_XY
Definition image.h:208
@ ORIENTATION_FLIP_Y
Definition image.h:206
@ ORIENTATION_ROTATE_CCW_90_DEG
Definition image.h:215
@ ORIENTATION_NULL
Definition image.h:204
@ ORIENTATION_ROTATE_CW_90_DEG
Definition image.h:216
@ ORIENTATION_NONE
Definition image.h:205
@ ORIENTATION_FLIP_X
Definition image.h:207
@ ORIENTATION_TRANSPOSE
Definition image.h:214
@ ORIENTATION_ROTATE_180_DEG
Definition image.h:213
@ ORIENTATION_FLIP_VERTICALLY
Definition image.h:212
@ ORIENTATION_FLIP_HORIZONTALLY
Definition image.h:211
void dt_image_print_exif(const dt_image_t *img, char *line, size_t line_len)
void dt_image_synch_all_xmp(const gchar *pathname)
void dt_image_get_location(const int32_t imgid, dt_image_geoloc_t *geoloc)
gboolean dt_image_is_hdr(const dt_image_t *img)
const char flag
Definition image.h:252
int32_t dt_image_duplicate_with_version(const int32_t imgid, const int32_t newversion)
gboolean dt_image_is_monochrome(const dt_image_t *img)
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)
const char * tooltip
Definition image.h:251
void dt_image_init(dt_image_t *img)
void dt_image_buffer_resolve_flags(dt_image_t *img)
int32_t dt_image_import(int32_t film_id, const char *filename, gboolean raise_signals)
void dt_image_set_datetimes(const GList *imgs, const GArray *dtime, const gboolean undo_on)
const char * dt_image_film_roll_name(const char *path)
float dt_image_get_exposure_bias(const struct dt_image_t *image_storage)
GList * dt_image_find_xmps(const char *filename)
void dt_image_set_datetime(const GList *imgs, const char *datetime, const gboolean undo_on)
gboolean dt_image_is_ldr(const dt_image_t *img)
dt_exif_image_orientation_t
Definition image.h:191
@ EXIF_ORIENTATION_NONE
Definition image.h:192
@ EXIF_ORIENTATION_TRANSPOSE
Definition image.h:196
@ EXIF_ORIENTATION_ROTATE_180_DEG
Definition image.h:195
@ EXIF_ORIENTATION_FLIP_VERTICALLY
Definition image.h:194
@ EXIF_ORIENTATION_ROTATE_CW_90_DEG
Definition image.h:198
@ EXIF_ORIENTATION_TRANSVERSE
Definition image.h:199
@ EXIF_ORIENTATION_ROTATE_CCW_90_DEG
Definition image.h:197
@ EXIF_ORIENTATION_FLIP_HORIZONTALLY
Definition image.h:193
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_MOSAIC
Definition image.h:146
@ DT_IMAGE_MONOCHROME_BAYER
Definition image.h:138
@ DT_IMAGE_LOCAL_COPY
Definition image.h:121
@ DT_IMAGE_BUFFER_RESOLVED
Definition image.h:151
@ 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
gboolean dt_image_pipe_class_is_provisional(const dt_image_t *img)
void dt_image_path_append_version_no_db(int version, char *pathname, size_t pathname_len)
gboolean dt_image_needs_rawprepare(const dt_image_t *img)
void dt_image_set_monochrome_flag(const int32_t imgid, gboolean monochrome)
void dt_image_set_images_locations(const GList *imgs, const GArray *gloc, const gboolean undo_on)
char * dt_image_get_audio_path_from_path(const char *image_path)
gboolean dt_image_use_monochrome_workflow(const dt_image_t *img)
int dt_image_local_copy_set(const int32_t imgid)
void dt_image_cleanup(void)
void dt_image_film_roll_directory(const dt_image_t *img, char *pathname, size_t pathname_len)
dt_image_path_source_t dt_image_choose_input_path(const dt_image_t *img, char *pathname, size_t pathname_len, gboolean force_cache)
void dt_image_remove(const int32_t imgid)
gboolean dt_image_is_sraw(const dt_image_t *img)
dt_image_pipe_class_t
Mutually-exclusive classification of an image by the early-pipeline processing it requires....
Definition image.h:169
@ DT_IMAGE_PIPE_MOSAIC_RAW
Definition image.h:171
@ DT_IMAGE_PIPE_LINEAR_RAW
Definition image.h:172
@ DT_IMAGE_PIPE_RGB_LDR
Definition image.h:173
@ DT_IMAGE_PIPE_RGB_HDR
Definition image.h:174
@ DT_IMAGE_PIPE_UNKNOWN
Definition image.h:170
gboolean dt_image_is_mosaiced(const dt_image_t *img)
char * dt_image_camera_missing_sample_message(const struct dt_image_t *img, gboolean logmsg)
int dt_image_get_xmp_rating_from_flags(const int flags)
int32_t dt_image_import_lua(int32_t film_id, const char *filename)
int dt_image_read_duplicates(const uint32_t id, const char *filename, const gboolean clear_selection)
static dt_image_orientation_t dt_image_orientation(const dt_image_t *img)
Definition image.h:524
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)
int dt_image_local_copy_reset(const int32_t imgid)
gboolean dt_image_get_xmp_mode()
char * dt_image_get_text_path(const int32_t imgid)
int32_t dt_image_get_id_full_path(const gchar *filename)
gboolean dt_image_safe_remove(const int32_t imgid)
void dt_image_set_xmp_rating(dt_image_t *img, const int rating)
dt_image_loader_t
Definition image.h:221
@ LOADER_PFM
Definition image.h:229
@ LOADER_AVIF
Definition image.h:233
@ LOADER_J2K
Definition image.h:225
@ LOADER_PNG
Definition image.h:224
@ LOADER_EXR
Definition image.h:227
@ LOADER_TIFF
Definition image.h:223
@ LOADER_JPEG
Definition image.h:226
@ LOADER_WEBP
Definition image.h:237
@ LOADER_GM
Definition image.h:230
@ LOADER_HEIF
Definition image.h:235
@ LOADER_RAWSPEED
Definition image.h:231
@ LOADER_PNM
Definition image.h:232
@ LOADER_RGBE
Definition image.h:228
@ LOADER_LIBRAW
Definition image.h:236
@ LOADER_UNKNOWN
Definition image.h:222
@ LOADER_COUNT
Definition image.h:238
@ LOADER_IM
Definition image.h:234
char * dt_image_build_text_path_from_path(const char *image_path)
void dt_image_flip(const int32_t imgid, const int32_t cw)
int32_t dt_image_duplicate(const int32_t imgid)
void dt_image_local_copy_synch()
int32_t dt_image_rename(const int32_t imgid, const int32_t filmid, const gchar *newname)
void dt_image_synch_xmp(const int selected)
void dt_get_dirname_from_imgid(gchar *dir, const int32_t imgid)
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.
void dt_image_history_changed(const int32_t imgid, const gboolean refresh_filmstrip)
gboolean dt_image_needs_demosaic(const dt_image_t *img)
void dt_image_set_provisional_dsc(dt_image_t *img)
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)
dt_mipmap_buffer_dsc_flags flags
Definition mipmap_cache.c:4
float dt_aligned_pixel_t[4]
unsigned __int64 uint64_t
Definition strptime.c:75
double latitude
Definition image.h:275
double elevation
Definition image.h:275
double longitude
Definition image.h:275
gboolean has_audio
Definition image.h:375
gboolean is_hdr
Definition image.h:378
float exif_exposure
Definition image.h:285
float pixel_aspect_ratio
Definition image.h:356
int32_t height
Definition image.h:315
gboolean camera_missing_sample
Definition image.h:302
GTimeSpan export_timestamp
Definition image.h:333
uint64_t history_hash
Definition image.h:322
char camera_model[64]
Definition image.h:298
float exif_focus_distance
Definition image.h:290
dt_boundingbox_t usercrop
Definition image.h:365
GTimeSpan import_timestamp
Definition image.h:333
gboolean is_bw
Definition image.h:376
int32_t group_id
Definition image.h:319
char camera_makermodel[128]
Definition image.h:300
float exif_exposure_bias
Definition image.h:286
uint16_t raw_black_level
Definition image.h:350
float exif_iso
Definition image.h:288
GList * dng_gain_maps
Definition image.h:368
dt_image_loader_t loader
Definition image.h:335
char camera_maker[64]
Definition image.h:297
uint32_t raw_white_point
Definition image.h:352
int32_t exif_inited
Definition image.h:283
float exif_aperture
Definition image.h:287
int32_t version
Definition image.h:319
int32_t crop_height
Definition image.h:316
uint64_t mipmap_hash
Definition image.h:329
char fullpath[PATH_MAX]
Definition image.h:305
dt_image_geoloc_t geoloc
Definition image.h:347
char camera_legacy_makermodel[128]
Definition image.h:301
int32_t flags
Definition image.h:319
dt_image_orientation_t orientation
Definition image.h:284
int32_t width
Definition image.h:315
float exif_focal_length
Definition image.h:289
char exif_maker[64]
Definition image.h:292
GTimeSpan change_timestamp
Definition image.h:333
uint32_t profile_size
Definition image.h:341
int32_t crop_y
Definition image.h:316
uint32_t history_items
Definition image.h:321
int rating
Definition image.h:372
gboolean has_localcopy
Definition image.h:374
int32_t num
Definition image.h:319
char camera_alias[64]
Definition image.h:299
char exif_lens[128]
Definition image.h:294
char local_copy_path[PATH_MAX]
Definition image.h:306
GTimeSpan print_timestamp
Definition image.h:333
int32_t film_id
Definition image.h:319
GTimeSpan exif_datetime_taken
Definition image.h:295
int32_t crop_x
Definition image.h:316
int color_labels
Definition image.h:371
float d65_color_matrix[9]
Definition image.h:339
int32_t p_height
Definition image.h:315
dt_iop_buffer_dsc_t dsc
Definition image.h:337
int32_t p_width
Definition image.h:315
char exif_model[64]
Definition image.h:293
dt_image_colorspace_t colorspace
Definition image.h:342
float adobe_XYZ_to_CAM[4][3]
Definition image.h:362
uint8_t * profile
Definition image.h:340
char datetime[200]
Definition image.h:310
struct dt_cache_entry_t * cache_entry
Definition image.h:381
int32_t crop_width
Definition image.h:316
uint32_t group_members
Definition image.h:320
dt_image_raw_parameters_t legacy_flip
Definition image.h:344
char filename[DT_MAX_FILENAME_LEN]
Definition image.h:304
char folder[PATH_MAX]
Definition image.h:308
int32_t id
Definition image.h:319
uint16_t raw_black_level_separate[4]
Definition image.h:351
char filmroll[PATH_MAX]
Definition image.h:309
uint64_t self_hash
Definition image.h:330
char local_copy_legacy_path[PATH_MAX]
Definition image.h:307
dt_aligned_pixel_t wb_coeffs
Definition image.h:359
float exif_crop
Definition image.h:291
uint32_t fuji_rotation_pos
Definition image.h:355
gboolean is_bw_flow
Definition image.h:377