![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/image.h"#include "common/collection.h"#include "common/darktable.h"#include "common/debug.h"#include "common/dtpthread.h"#include "common/exif.h"#include "common/file_location.h"#include "common/grouping.h"#include "common/history.h"#include "common/history_merge.h"#include "common/history_snapshot.h"#include "common/image_cache.h"#include "common/imageio.h"#include "common/imageio_rawspeed.h"#include "common/imageio_libraw.h"#include "common/mipmap_cache.h"#include "common/ratings.h"#include "common/tags.h"#include "common/undo.h"#include "common/selection.h"#include "common/datetime.h"#include "control/conf.h"#include "control/control.h"#include "control/jobs.h"#include "develop/lightroom.h"#include "develop/develop.h"#include "win/filepath.h"#include <assert.h>#include <ctype.h>#include <math.h>#include <sqlite3.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include <glob.h>#include <glib/gstdio.h>
Include dependency graph for common/image.c:Data Structures | |
| struct | dt_undo_monochrome_t |
| struct | dt_undo_datetime_t |
| struct | dt_undo_geotag_t |
| struct | dt_undo_duplicate_t |
| struct | _datetime_t |
Typedefs | |
| typedef struct dt_undo_monochrome_t | dt_undo_monochrome_t |
| typedef struct dt_undo_datetime_t | dt_undo_datetime_t |
| typedef struct dt_undo_geotag_t | dt_undo_geotag_t |
| typedef struct dt_undo_duplicate_t | dt_undo_duplicate_t |
| typedef struct _datetime_t | _datetime_t |
Functions | |
| static void | _image_stmt_mutex_ensure (void) |
| static void | _pop_undo_execute (const int32_t imgid, const gboolean before, const gboolean after) |
| static int32_t | _image_duplicate_with_version (const int32_t imgid, const int32_t newversion, const gboolean undo) |
| static void | _pop_undo (gpointer user_data, const dt_undo_type_t type, dt_undo_data_t data, const dt_undo_action_t action, GList **imgs) |
| static void | _copy_text_sidecar_if_present (const char *src_image_path, const char *dest_image_path) |
| static void | _move_text_sidecar_if_present (const char *src_image_path, const char *dest_image_path, const gboolean overwrite) |
| int | dt_image_is_ldr (const dt_image_t *img) |
| int | dt_image_is_hdr (const dt_image_t *img) |
| int | dt_image_is_raw (const dt_image_t *img) |
| gboolean | dt_image_is_monochrome (const dt_image_t *img) |
| static void | _image_set_monochrome_flag (const int32_t imgid, gboolean monochrome, gboolean undo_on) |
| void | dt_image_set_monochrome_flag (const int32_t imgid, gboolean monochrome) |
| static gboolean | _image_matrix_has_data (const float *matrix, const int count) |
| gboolean | dt_image_is_matrix_correction_supported (const dt_image_t *img) |
| gboolean | dt_image_is_rawprepare_supported (const dt_image_t *img) |
| gboolean | dt_image_use_monochrome_workflow (const dt_image_t *img) |
| int | dt_image_monochrome_flags (const dt_image_t *img) |
| static const char * | _image_buf_type_to_string (const dt_iop_buffer_type_t type) |
| static const char * | _image_colorspace_to_string (const dt_image_colorspace_t colorspace) |
| void | dt_image_print_debug_info (const dt_image_t *img, const char *context) |
| const char * | dt_image_film_roll_name (const char *path) |
| void | dt_image_film_roll_directory (const dt_image_t *img, char *pathname, size_t pathname_len) |
| void | dt_image_film_roll (const dt_image_t *img, char *pathname, size_t pathname_len) |
| gboolean | dt_image_get_xmp_mode () |
| gboolean | dt_image_safe_remove (const int32_t imgid) |
| 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_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_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) |
| void | dt_image_path_append_version_no_db (int version, char *pathname, size_t pathname_len) |
| void | dt_image_path_append_version (const int32_t imgid, char *pathname, size_t pathname_len) |
| void | dt_image_print_exif (const dt_image_t *img, char *line, size_t line_len) |
| int | dt_image_get_xmp_rating_from_flags (const int flags) |
| int | dt_image_get_xmp_rating (const dt_image_t *img) |
| void | dt_image_set_xmp_rating (dt_image_t *img, const int rating) |
| void | dt_image_get_location (const int32_t imgid, dt_image_geoloc_t *geoloc) |
| static void | _set_location (const int32_t imgid, const dt_image_geoloc_t *geoloc) |
| static void | _set_datetime (const int32_t imgid, const char *datetime) |
| static void | _geotag_undo_data_free (gpointer data) |
| static void | _image_set_location (GList *imgs, const dt_image_geoloc_t *geoloc, GList **undo, const gboolean undo_on) |
| void | dt_image_set_locations (const GList *imgs, const dt_image_geoloc_t *geoloc, const gboolean undo_on) |
| void | dt_image_set_location (const int32_t imgid, const dt_image_geoloc_t *geoloc, const gboolean undo_on, const gboolean group_on) |
| static void | _image_set_images_locations (const GList *img, const GArray *gloc, GList **undo, const gboolean undo_on) |
| void | dt_image_set_images_locations (const GList *imgs, const GArray *gloc, const gboolean undo_on) |
| void | dt_image_set_flip (const int32_t imgid, const dt_image_orientation_t orientation) |
| dt_image_orientation_t | dt_image_get_orientation (const int32_t imgid) |
| void | dt_image_flip (const int32_t imgid, const int32_t cw) |
| int32_t | dt_image_duplicate (const int32_t imgid) |
| static int32_t | _image_duplicate_with_version_ext (const int32_t imgid, const int32_t newversion) |
| int32_t | dt_image_duplicate_with_version (const int32_t imgid, const int32_t newversion) |
| void | dt_image_remove (const int32_t imgid) |
| uint32_t | dt_image_altered (const int32_t imgid) |
| void | dt_image_cleanup (void) |
| static int | _valid_glob_match (const char *const name, size_t offset) |
| GList * | dt_image_find_xmps (const char *filename) |
| int | dt_image_read_duplicates (const uint32_t id, const char *filename, const gboolean clear_selection) |
| static int32_t | _image_import_internal (const int32_t film_id, const char *filename, gboolean lua_locking, gboolean raise_signals) |
| int32_t | dt_image_get_id_full_path (const gchar *filename) |
| int32_t | dt_image_get_id (int32_t film_id, const gchar *filename) |
| int32_t | dt_image_import (const int32_t film_id, const char *filename, gboolean raise_signals) |
| int32_t | dt_image_import_lua (const int32_t film_id, const char *filename) |
| void | dt_image_init (dt_image_t *img) |
| void | dt_image_refresh_makermodel (dt_image_t *img) |
| int32_t | dt_image_rename (const int32_t imgid, const int32_t filmid, const gchar *newname) |
| int32_t | dt_image_move (const int32_t imgid, const int32_t filmid) |
| int32_t | dt_image_copy_rename (const int32_t imgid, const int32_t filmid, const gchar *newname) |
| int32_t | dt_image_copy (const int32_t imgid, const int32_t filmid) |
| int | dt_image_local_copy_set (const int32_t imgid) |
| static int | _nb_other_local_copy_for (const int32_t imgid) |
| int | dt_image_local_copy_reset (const int32_t imgid) |
| static void | _write_timestamp_stmt_ensure (void) |
| static int64_t | _write_timestamp_get (const int32_t imgid) |
| static void | _write_timestamp_set_now (const int32_t imgid) |
| static gboolean | _sidecar_is_up_to_date (const dt_image_t *img) |
| static int | _write_sidecar_file_from_image_locked (const dt_image_t *img) |
| int | dt_image_write_sidecar_file (const int32_t imgid) |
| void | dt_image_synch_xmps (const GList *img) |
| void | dt_image_synch_xmp (const int selected) |
| void | dt_image_synch_all_xmp (const gchar *pathname) |
| void | dt_image_local_copy_synch () |
| void | dt_image_get_datetime (const int32_t imgid, char *datetime) |
| static void | _datetime_undo_data_free (gpointer data) |
| static void | _image_set_datetimes (const GList *img, const GArray *dtime, GList **undo, const gboolean undo_on) |
| void | dt_image_set_datetimes (const GList *imgs, const GArray *dtime, const gboolean undo_on) |
| static void | _image_set_datetime (const GList *img, const char *datetime, GList **undo, const gboolean undo_on) |
| void | dt_image_set_datetime (const GList *imgs, const char *datetime, const gboolean undo_on) |
| char * | dt_image_get_audio_path_from_path (const char *image_path) |
| char * | dt_image_get_audio_path (const int32_t imgid) |
| static char * | _text_path_legacy_if_exists (const char *image_path) |
| static char * | _text_path_legacy_build (const char *image_path) |
| char * | dt_image_get_text_path_from_path (const char *image_path) |
| char * | dt_image_build_text_path_from_path (const char *image_path) |
| char * | dt_image_get_text_path (const int32_t imgid) |
| float | dt_image_get_exposure_bias (const struct dt_image_t *image_storage) |
| char * | dt_image_camera_missing_sample_message (const struct dt_image_t *img, gboolean logmsg) |
| void | dt_image_check_camera_missing_sample (const struct dt_image_t *img) |
| void | dt_get_dirname_from_imgid (gchar *dir, const int32_t imgid) |
Variables | |
| static sqlite3_stmt * | _image_altered_stmt = NULL |
| static dt_pthread_mutex_t | _image_stmt_mutex |
| static gsize | _image_stmt_mutex_inited = 0 |
| static sqlite3_stmt * | _write_timestamp_select_stmt = NULL |
| static sqlite3_stmt * | _write_timestamp_update_stmt = NULL |
| static dt_pthread_mutex_t | _write_timestamp_stmt_mutex |
| static gsize | _write_timestamp_stmt_mutex_inited = 0 |
| typedef struct _datetime_t _datetime_t |
| typedef struct dt_undo_datetime_t dt_undo_datetime_t |
| typedef struct dt_undo_duplicate_t dt_undo_duplicate_t |
| typedef struct dt_undo_geotag_t dt_undo_geotag_t |
| typedef struct dt_undo_monochrome_t dt_undo_monochrome_t |
|
static |
References _text_path_legacy_build(), dt_free, dt_image_get_text_path_from_path(), and TRUE.
Referenced by dt_image_copy_rename(), and dt_image_local_copy_set().
|
static |
References dt_free_gpointer().
Referenced by dt_image_set_datetime(), and dt_image_set_datetimes().
|
static |
References dt_free_gpointer().
Referenced by dt_image_set_images_locations(), and dt_image_set_locations().
|
static |
References type, TYPE_FLOAT, TYPE_UINT16, TYPE_UINT8, and TYPE_UNKNOWN.
Referenced by dt_image_print_debug_info().
|
static |
References DT_IMAGE_COLORSPACE_ADOBE_RGB, DT_IMAGE_COLORSPACE_NONE, and DT_IMAGE_COLORSPACE_SRGB.
Referenced by dt_image_print_debug_info().
|
static |
References _image_duplicate_with_version_ext(), _pop_undo(), darktable_t::collection, darktable, DT_COLLECTION_CHANGE_RELOAD, DT_COLLECTION_PROP_UNDEF, dt_collection_update_query(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_grouping_add_to_group(), dt_image_cache_get(), dt_image_cache_read_release(), DT_SIGNAL_TAG_CHANGED, dt_tag_detach_by_string(), DT_UNDO_DUPLICATE, dt_undo_record(), FALSE, dt_image_t::group_id, darktable_t::image_cache, dt_undo_duplicate_t::new_imgid, dt_undo_duplicate_t::orig_imgid, darktable_t::signals, darktable_t::undo, and dt_undo_duplicate_t::version.
Referenced by _pop_undo(), and dt_image_duplicate_with_version().
|
static |
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, MAX, and UNKNOWN_IMAGE.
Referenced by _image_duplicate_with_version(), and dt_image_read_duplicates().
|
static |
References darktable, darktable_t::db, dt_control_log(), dt_control_save_xmp(), dt_database_get(), dt_datetime_now_to_gtimespan(), DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_INT64, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_exif_read(), dt_exif_xmp_read(), dt_free, dt_image_cache_get(), DT_IMAGE_CACHE_RELAXED, DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), dt_image_get_audio_path_from_path(), dt_image_get_id(), dt_image_get_text_path_from_path(), dt_image_get_xmp_mode(), DT_IMAGE_HAS_TXT, DT_IMAGE_HAS_WAV, DT_IMAGE_NO_LEGACY_PRESETS, dt_image_read_duplicates(), dt_image_synch_all_xmp(), dt_imageio_get_type_from_extension(), dt_lightroom_import(), dt_lua_event_trigger(), dt_mipmap_cache_remove(), DT_SIGNAL_GEOTAG_CHANGED, DT_SIGNAL_IMAGE_IMPORT, dt_tag_attach(), dt_tag_new(), dt_util_normalize_path(), dt_util_test_image_file(), extension(), FALSE, dt_image_t::filename, flags, dt_image_t::group_id, i, darktable_t::image_cache, L, darktable_t::lua_state, darktable_t::mipmap_cache, PATH_MAX, darktable_t::signals, supported(), TRUE, UNKNOWN_IMAGE, and void().
Referenced by dt_image_import(), and dt_image_import_lua().
|
static |
References FALSE, i, and matrix.
Referenced by dt_image_is_matrix_correction_supported().
|
static |
References _set_datetime(), dt_undo_datetime_t::after, dt_undo_datetime_t::before, DT_DATETIME_LENGTH, dt_image_get_datetime(), and dt_undo_datetime_t::imgid.
Referenced by dt_image_set_datetime().
|
static |
References _set_datetime(), dt_undo_datetime_t::after, dt_undo_datetime_t::before, _datetime_t::dt, DT_DATETIME_LENGTH, dt_image_get_datetime(), i, and dt_undo_datetime_t::imgid.
Referenced by dt_image_set_datetimes().
|
static |
References _set_location(), dt_undo_geotag_t::after, dt_undo_geotag_t::before, dt_image_get_location(), i, and dt_undo_geotag_t::imgid.
Referenced by dt_image_set_images_locations().
|
static |
References _set_location(), dt_undo_geotag_t::after, dt_undo_geotag_t::before, dt_image_get_location(), and dt_undo_geotag_t::imgid.
Referenced by dt_image_set_locations().
|
static |
References _pop_undo(), dt_undo_monochrome_t::after, dt_undo_monochrome_t::before, darktable, dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), dt_image_monochrome_flags(), DT_IMAGE_MONOCHROME_PREVIEW, DT_IMAGE_MONOCHROME_WORKFLOW, dt_imageio_update_monochrome_workflow_tag(), DT_UNDO_FLAGS, dt_undo_record(), FALSE, dt_image_t::flags, darktable_t::image_cache, dt_undo_monochrome_t::imgid, TRUE, and darktable_t::undo.
Referenced by _pop_undo_execute(), and dt_image_set_monochrome_flag().
References _image_stmt_mutex, _image_stmt_mutex_inited, and dt_pthread_mutex_init().
Referenced by dt_image_altered(), and dt_image_cleanup().
|
static |
References _text_path_legacy_build(), dt_free, dt_image_get_text_path_from_path(), and flags.
Referenced by dt_image_local_copy_reset(), and dt_image_rename().
|
static |
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, and DT_IMAGE_LOCAL_COPY.
Referenced by dt_image_local_copy_reset().
|
static |
References _image_duplicate_with_version(), _pop_undo_execute(), _set_datetime(), _set_location(), dt_undo_monochrome_t::after, dt_undo_datetime_t::after, dt_undo_geotag_t::after, dt_undo_monochrome_t::before, dt_undo_datetime_t::before, dt_undo_geotag_t::before, darktable, DT_ACTION_UNDO, dt_control_log(), DT_DEBUG_CONTROL_SIGNAL_RAISE, dt_image_remove(), DT_SIGNAL_GEOTAG_CHANGED, DT_UNDO_DATETIME, DT_UNDO_DUPLICATE, DT_UNDO_FLAGS, DT_UNDO_GEOTAG, FALSE, i, dt_undo_monochrome_t::imgid, dt_undo_datetime_t::imgid, dt_undo_geotag_t::imgid, dt_undo_duplicate_t::new_imgid, dt_undo_duplicate_t::orig_imgid, darktable_t::signals, type, and dt_undo_duplicate_t::version.
Referenced by _image_duplicate_with_version(), _image_set_monochrome_flag(), dt_image_set_datetime(), dt_image_set_datetimes(), dt_image_set_images_locations(), and dt_image_set_locations().
|
static |
References _image_set_monochrome_flag(), and FALSE.
Referenced by _pop_undo().
|
static |
References darktable, dt_datetime_exif_to_img(), dt_image_cache_get(), DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), and darktable_t::image_cache.
Referenced by _image_set_datetime(), _image_set_datetimes(), and _pop_undo().
|
static |
References darktable, dt_image_cache_get(), DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), dt_image_t::geoloc, and darktable_t::image_cache.
Referenced by _image_set_images_locations(), _image_set_location(), and _pop_undo().
|
static |
References _write_timestamp_get(), dt_image_t::change_timestamp, dt_datetime_gtimespan_to_gdatetime(), DT_DEBUG_CONTROL, dt_print(), FALSE, and dt_image_t::id.
Referenced by _write_sidecar_file_from_image_locked().
|
static |
References c.
Referenced by _copy_text_sidecar_if_present(), _move_text_sidecar_if_present(), and dt_image_build_text_path_from_path().
|
static |
Referenced by dt_image_get_text_path_from_path().
|
static |
References FALSE, i, and name.
Referenced by dt_image_find_xmps().
|
static |
|
static |
References _write_timestamp_select_stmt, _write_timestamp_stmt_ensure(), _write_timestamp_stmt_mutex, darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by _sidecar_is_up_to_date().
|
static |
References _write_timestamp_stmt_ensure(), _write_timestamp_stmt_mutex, _write_timestamp_update_stmt, darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by _write_sidecar_file_from_image_locked().
References _write_timestamp_stmt_mutex, _write_timestamp_stmt_mutex_inited, and dt_pthread_mutex_init().
Referenced by _write_timestamp_get(), and _write_timestamp_set_now().
| void dt_get_dirname_from_imgid | ( | gchar * | dir, |
| const int32_t | imgid | ||
| ) |
get dirname from imgid
References dt_image_full_path(), FALSE, and PATH_MAX.
Referenced by dt_collection_load_filmroll().
| uint32_t dt_image_altered | ( | const int32_t | imgid | ) |
returns the number of history entries in library for this image
References _image_altered_stmt, _image_stmt_mutex, _image_stmt_mutex_ensure(), darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by is_altered_member().
| char * dt_image_build_text_path_from_path | ( | const char * | image_path | ) |
References _text_path_legacy_build().
Referenced by _import_copy_txt(), and _text_sidecar_save_path().
| char * dt_image_camera_missing_sample_message | ( | const struct dt_image_t * | img, |
| gboolean | logmsg | ||
| ) |
handle message for missing camera samples reported by rawspeed
References dt_image_t::camera_maker, dt_image_t::camera_model, dt_free, and dt_util_str_replace().
Referenced by dt_image_check_camera_missing_sample().
| void dt_image_check_camera_missing_sample | ( | const struct dt_image_t * | img | ) |
References dt_image_t::camera_missing_sample, dt_control_log(), dt_free, dt_image_camera_missing_sample_message(), and TRUE.
Referenced by _darkroom_image_loaded_callback().
| dt_image_path_source_t dt_image_choose_input_path | ( | const dt_image_t * | img, |
| char * | pathname, | ||
| size_t | pathname_len, | ||
| gboolean | force_cache | ||
| ) |
test local copies and original files to find an image buffer
References DT_IMAGE_LOCAL_COPY, DT_IMAGE_PATH_LOCAL_COPY, DT_IMAGE_PATH_LOCAL_COPY_LEGACY, DT_IMAGE_PATH_NONE, DT_IMAGE_PATH_ORIGINAL, dt_image_t::flags, dt_image_t::fullpath, dt_image_t::local_copy_legacy_path, and dt_image_t::local_copy_path.
Referenced by _generate_blocking(), _init_f(), _write_mipmap_to_disk(), _write_sidecar_file_from_image_locked(), dt_image_full_path(), dt_image_local_copy_reset(), dt_image_local_copy_set(), and dt_image_rename().
cleanup cached statements
References _image_altered_stmt, _image_stmt_mutex, _image_stmt_mutex_ensure(), dt_pthread_mutex_lock(), and dt_pthread_mutex_unlock().
Referenced by dt_cleanup().
| int32_t dt_image_copy | ( | const int32_t | imgid, |
| const int32_t | filmid | ||
| ) |
physically copy image to the folder of the film roll with filmid and duplicate update database entries.
References dt_image_copy_rename().
Referenced by dt_control_copy_images_job_run(), and dt_lua_copy_image().
| int32_t dt_image_copy_rename | ( | const int32_t | imgid, |
| const int32_t | filmid, | ||
| const gchar * | newname | ||
| ) |
physically copy image to the folder of the film roll with filmid and the name given by newname, and duplicate update database entries.
References _copy_text_sidecar_if_present(), darktable_t::collection, darktable, darktable_t::db, DT_COLLECTION_CHANGE_RELOAD, DT_COLLECTION_PROP_UNDEF, dt_collection_update_query(), dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, dt_history_copy_and_paste_on_image(), DT_HISTORY_MERGE_REPLACE, dt_image_full_path(), dt_mipmap_cache_copy_thumbnails(), FALSE, darktable_t::mipmap_cache, PATH_MAX, and TRUE.
Referenced by dt_image_copy(), and dt_lua_copy_image().
| int32_t dt_image_duplicate | ( | const int32_t | imgid | ) |
duplicates the given image in the database.
References dt_image_duplicate_with_version().
Referenced by _history_style_apply(), dt_control_duplicate_images_job_run(), and dt_lua_duplicate_image().
| int32_t dt_image_duplicate_with_version | ( | const int32_t | imgid, |
| const int32_t | newversion | ||
| ) |
duplicates the given image in the database with the duplicate getting the supplied version number. if that version already exists just return the imgid without producing new duplicate. called with newversion -1 a new duplicate is produced with the next free version number.
References _image_duplicate_with_version(), and TRUE.
Referenced by dt_image_duplicate().
| void dt_image_film_roll | ( | const dt_image_t * | img, |
| char * | pathname, | ||
| size_t | pathname_len | ||
| ) |
returns the film roll name, i.e. without the path.
References c, darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_image_film_roll_name(), f, and dt_image_t::film_id.
| void dt_image_film_roll_directory | ( | const dt_image_t * | img, |
| char * | pathname, | ||
| size_t | pathname_len | ||
| ) |
returns the full directory of the associated film roll.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, f, and dt_image_t::film_id.
Referenced by _jump_to(), load_xmp_callback(), path_member(), and update_preview_cb().
| const char * dt_image_film_roll_name | ( | const char * | path | ) |
returns the portion of the path used for the film roll name.
References CLAMPS, and dt_conf_get_int().
Referenced by dt_image_cache_write_release(), dt_image_film_roll(), dt_image_from_stmt(), list_view(), and pretty_print_collection().
| GList * dt_image_find_xmps | ( | const char * | filename | ) |
finds all xmp duplicates for the given image in the database.
References _valid_glob_match(), dt_util_test_image_file(), i, PATH_MAX, and win_image_find_duplicates().
Referenced by _import_copy_xmp(), dt_control_delete_images_job_run(), and dt_image_read_duplicates().
| void dt_image_flip | ( | const int32_t | imgid, |
| const int32_t | cw | ||
| ) |
flips the image, clock wise, if given flag.
References dt_undo_lt_history_t::after, dt_undo_lt_history_t::after_history_end, dt_undo_lt_history_t::before, dt_undo_lt_history_t::before_history_end, darktable, darktable_t::develop, dt_history_snapshot_item_init(), dt_history_snapshot_undo_create(), dt_history_snapshot_undo_lt_history_data_free(), dt_history_snapshot_undo_pop(), dt_image_get_orientation(), dt_image_set_flip(), dt_mipmap_cache_remove(), dt_thumbtable_refresh_thumbnail, DT_UNDO_LT_HISTORY, dt_undo_record(), DT_VIEW_DARKROOM, dt_view_manager_get_current_view(), darktable_t::gui, dt_image_t::id, dt_develop_t::image_storage, dt_undo_lt_history_t::imgid, darktable_t::mipmap_cache, ORIENTATION_FLIP_X, ORIENTATION_FLIP_Y, ORIENTATION_NULL, ORIENTATION_SWAP_XY, dt_ui_t::thumbtable_lighttable, TRUE, dt_gui_gtk_t::ui, darktable_t::undo, and darktable_t::view_manager.
Referenced by dt_control_flip_images_job_run().
| 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.
| imgid | The image ID. |
| pathname | A pointer storing the returned value from the sql request. |
| pathname_len | Number of characters of the path set outside the function. |
| from_cache | Boolean, false returns the original file (file system), true prefers a local copy when available. |
| calling_func | Pass FUNCTION for identifcation of callers of this function. |
References darktable, dt_image_cache_get(), dt_image_cache_read_release(), dt_image_choose_input_path(), DT_IMAGE_PATH_LOCAL_COPY, DT_IMAGE_PATH_LOCAL_COPY_LEGACY, DT_IMAGE_PATH_NONE, FALSE, darktable_t::image_cache, and TRUE.
Referenced by _event_dnd_get(), _set_image_paths(), _view_map_dnd_get_callback(), _watermark_get_svgdoc(), dt_control_delete_images_job_run(), dt_control_export_job_run(), dt_control_merge_hdr_job_run(), dt_control_refresh_exif_run(), dt_drawlayer_io_sidecar_path(), dt_exif_xmp_attach_export(), dt_exif_xmp_read_string(), dt_get_dirname_from_imgid(), dt_get_lightroom_xmp(), dt_image_copy_rename(), dt_image_find_best_color_profile(), dt_image_get_audio_path(), dt_image_get_text_path(), dt_image_local_copy_reset(), dt_image_local_copy_synch(), dt_image_rename(), dt_image_safe_remove(), dt_imageio_export_with_flags(), dt_view_image_info_update(), image_tostring(), sidecar_member(), store(), store(), store_wrapper(), try_enter(), and write_image().
| char * dt_image_get_audio_path | ( | const int32_t | imgid | ) |
helper function to get the audio file filename that is accompanying the image. g_free() after use
References dt_image_full_path(), dt_image_get_audio_path_from_path(), FALSE, and PATH_MAX.
Referenced by dt_view_audio_start().
| char * dt_image_get_audio_path_from_path | ( | const char * | image_path | ) |
Referenced by _image_import_internal(), and dt_image_get_audio_path().
| void dt_image_get_datetime | ( | const int32_t | imgid, |
| char * | datetime | ||
| ) |
| float dt_image_get_exposure_bias | ( | const struct dt_image_t * | image_storage | ) |
References dt_image_t::exif_exposure_bias.
Referenced by reload_defaults().
| int32_t dt_image_get_id | ( | int32_t | film_id, |
| const gchar * | filename | ||
| ) |
get image id by film_id and filename
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_BIND_TEXT, and DT_DEBUG_SQLITE3_PREPARE_V2.
Referenced by _image_import_internal(), and _is_in_library_by_path().
| int32_t dt_image_get_id_full_path | ( | const gchar * | filename | ) |
get image id by filename
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_TEXT, DT_DEBUG_SQLITE3_PREPARE_V2, and dt_free.
Referenced by dt_image_synch_all_xmp().
| void dt_image_get_location | ( | const int32_t | imgid, |
| dt_image_geoloc_t * | geoloc | ||
| ) |
get image location lon/lat/ele
References darktable, dt_image_cache_get(), dt_image_cache_read_release(), dt_image_geoloc_t::elevation, dt_image_t::geoloc, darktable_t::image_cache, dt_image_geoloc_t::latitude, and dt_image_geoloc_t::longitude.
Referenced by _image_set_images_locations(), _image_set_location(), and _view_map_center_on_image().
| dt_image_orientation_t dt_image_get_orientation | ( | const int32_t | imgid | ) |
| char * dt_image_get_text_path | ( | const int32_t | imgid | ) |
helper function to get the text file filename that is accompanying the image. g_free() after use
References dt_image_full_path(), dt_image_get_text_path_from_path(), FALSE, PATH_MAX, and TRUE.
Referenced by _get_base_value().
| char * dt_image_get_text_path_from_path | ( | const char * | image_path | ) |
| gboolean dt_image_get_xmp_mode | ( | ) |
get the mode xmp sidecars are written
References dt_conf_get_string_const(), dt_conf_set_string(), FALSE, and TRUE.
Referenced by _exif_decode_xmp_data(), _image_import_internal(), dt_control_save_xmps_job_run(), dt_image_cache_write_release(), dt_image_local_copy_synch(), dt_image_safe_remove(), dt_image_synch_all_xmp(), dt_image_synch_xmps(), dt_image_write_sidecar_file(), and dt_metadata_set_import().
| int dt_image_get_xmp_rating | ( | const dt_image_t * | img | ) |
References dt_image_get_xmp_rating_from_flags(), and dt_image_t::flags.
| int dt_image_get_xmp_rating_from_flags | ( | const int | flags | ) |
References DT_IMAGE_REJECTED, DT_VIEW_RATINGS_MASK, and flags.
Referenced by _exif_xmp_read_data(), _exif_xmp_read_data_export(), dt_image_cache_write_release(), dt_image_from_stmt(), and dt_image_get_xmp_rating().
| int32_t dt_image_import | ( | int32_t | film_id, |
| const char * | filename, | ||
| gboolean | raise_signals | ||
| ) |
imports a new image from raw/etc file and adds it to the data base and image cache. Use from threads other than lua.
References _image_import_internal(), and TRUE.
Referenced by _film_import1(), _import_job(), dt_control_merge_hdr_job_run(), dt_image_import_job_run(), dt_load_from_string(), and main().
| int32_t dt_image_import_lua | ( | int32_t | film_id, |
| const char * | filename | ||
| ) |
imports a new image from raw/etc file and adds it to the data base and image cache. Use from lua thread.
References _image_import_internal(), FALSE, and TRUE.
Referenced by import_images().
| void dt_image_init | ( | dt_image_t * | img | ) |
inits basic values to sensible defaults.
References dt_image_t::adobe_XYZ_to_CAM, dt_image_t::cache_entry, dt_image_t::camera_alias, dt_image_t::camera_legacy_makermodel, dt_image_t::camera_maker, dt_image_t::camera_makermodel, dt_image_t::camera_missing_sample, dt_image_t::camera_model, dt_image_t::change_timestamp, dt_iop_buffer_dsc_t::channels, dt_image_t::color_labels, dt_image_t::colorspace, dt_image_t::crop_height, dt_image_t::crop_width, dt_image_t::crop_x, dt_image_t::crop_y, dt_image_t::d65_color_matrix, dt_image_t::datetime, dt_image_t::dng_gain_maps, dt_image_t::dsc, dt_datetime_exif_to_img(), DT_IMAGE_COLORSPACE_NONE, dt_image_geoloc_t::elevation, dt_image_t::exif_aperture, dt_image_t::exif_crop, dt_image_t::exif_exposure, dt_image_t::exif_exposure_bias, dt_image_t::exif_focal_length, dt_image_t::exif_focus_distance, dt_image_t::exif_inited, dt_image_t::exif_iso, dt_image_t::exif_lens, dt_image_t::exif_maker, dt_image_t::exif_model, dt_image_t::export_timestamp, FALSE, dt_image_t::filename, dt_image_t::film_id, dt_image_t::filmroll, dt_image_t::flags, dt_image_t::folder, dt_image_t::fuji_rotation_pos, dt_image_t::fullpath, dt_image_t::geoloc, dt_image_t::group_id, dt_image_t::group_members, dt_image_t::has_audio, dt_image_t::has_localcopy, dt_image_t::height, dt_image_t::history_hash, dt_image_t::history_items, i, dt_image_t::id, dt_image_t::import_timestamp, dt_image_t::is_bw, dt_image_t::is_bw_flow, dt_image_t::is_hdr, dt_image_geoloc_t::latitude, dt_image_raw_parameters_t::legacy, dt_image_t::legacy_flip, dt_image_t::loader, LOADER_UNKNOWN, dt_image_t::local_copy_legacy_path, dt_image_t::local_copy_path, dt_image_geoloc_t::longitude, dt_image_t::mipmap_hash, dt_image_t::orientation, ORIENTATION_NULL, dt_image_t::p_height, dt_image_t::p_width, dt_image_t::pixel_aspect_ratio, dt_image_t::print_timestamp, dt_image_t::profile, dt_image_t::profile_size, dt_image_t::rating, dt_image_t::raw_black_level, dt_image_t::raw_black_level_separate, dt_image_t::raw_white_point, dt_image_t::self_hash, TYPE_UNKNOWN, UNKNOWN_IMAGE, dt_image_raw_parameters_t::user_flip, dt_image_t::usercrop, dt_image_t::version, dt_image_t::wb_coeffs, and dt_image_t::width.
Referenced by _dt_collection_lut(), _import_copy_file(), _set_test_path(), dt_dev_init(), dt_image_cache_allocate(), and update_preview_cb().
| int dt_image_is_hdr | ( | const dt_image_t * | img | ) |
returns non-zero if the image contains float data.
References c, DT_IMAGE_HDR, dt_image_t::filename, and dt_image_t::flags.
Referenced by _dev_auto_apply_presets(), _exif_decode_exif_data(), _gui_presets_popup_menu_show_internal(), dt_gui_presets_autoapply_for_module(), dt_image_cache_write_release(), dt_image_from_stmt(), dt_image_print_debug_info(), and is_hdr_member().
| int dt_image_is_ldr | ( | const dt_image_t * | img | ) |
returns non-zero if the image contains low-dynamic range data.
References c, DT_IMAGE_LDR, dt_image_t::filename, and dt_image_t::flags.
Referenced by _exif_decode_exif_data(), dt_image_print_debug_info(), generate_preset_combo(), and is_ldr_member().
| gboolean dt_image_is_matrix_correction_supported | ( | const dt_image_t * | img | ) |
returns non-zero if the image supports a color correction matrix
References _image_matrix_has_data(), dt_image_t::adobe_XYZ_to_CAM, dt_image_t::d65_color_matrix, dt_image_t::dsc, DT_IMAGE_MONOCHROME, DT_IMAGE_RAW, DT_IMAGE_S_RAW, FALSE, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, and TRUE.
Referenced by _dev_auto_apply_presets(), _insert_default_modules(), _resolve_input_profile(), calculate_bogus_daylight_wb(), dt_colorspaces_get_input_profile_from_image(), dt_gui_presets_autoapply_for_module(), dt_image_find_best_color_profile(), find_temperature_from_raw_coeffs(), get_white_balance_coeff(), gui_update(), process_cmatrix(), process_lcms2(), reload_defaults(), and update_profile_list().
| gboolean dt_image_is_monochrome | ( | const dt_image_t * | img | ) |
returns non-zero if this image was taken using a monochrome camera
References DT_IMAGE_MONOCHROME, DT_IMAGE_MONOCHROME_BAYER, FALSE, dt_image_t::flags, and TRUE.
Referenced by colorpicker_callback(), commit_params(), commit_params(), distort_backtransform(), distort_transform(), dt_image_find_best_color_profile(), dt_image_print_debug_info(), enable(), force_enable(), gui_changed(), gui_update(), gui_update(), process(), reload_defaults(), and reload_defaults().
| int dt_image_is_raw | ( | const dt_image_t * | img | ) |
returns non-zero if the image contains mosaic data.
References DT_IMAGE_RAW, and dt_image_t::flags.
Referenced by _get_structure(), _insert_default_modules(), _set_params(), commit_params(), commit_params(), default_input_format(), default_output_format(), dt_dev_pixelpipe_change(), dt_image_print_debug_info(), dt_lightroom_import(), enable(), force_enable(), gui_changed(), gui_update(), gui_update(), is_raw_member(), prepare_matrices(), and reload_defaults().
| gboolean dt_image_is_rawprepare_supported | ( | const dt_image_t * | img | ) |
returns non-zero if the image supports the rawprepare module
References DT_IMAGE_RAW, DT_IMAGE_S_RAW, FALSE, dt_image_t::flags, and TRUE.
Referenced by _dev_auto_apply_presets(), _gui_presets_popup_menu_show_internal(), commit_params(), dt_dev_pixelpipe_change(), dt_gui_presets_autoapply_for_module(), dt_iop_gui_update_blending(), enable(), and gui_update().
| 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 | ||
| ) |
pregenerate modern and legacy pathes to local copies from full path
References c, dt_free, dt_loc_get_user_cache_dir(), and PATH_MAX.
Referenced by dt_image_cache_write_release(), and dt_image_from_stmt().
| int dt_image_local_copy_reset | ( | const int32_t | imgid | ) |
References _move_text_sidecar_if_present(), _nb_other_local_copy_for(), darktable, dt_control_log(), dt_control_queue_redraw_center(), dt_control_save_xmp(), dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), dt_image_choose_input_path(), dt_image_full_path(), DT_IMAGE_LOCAL_COPY, dt_image_path_append_version(), dt_loc_get_user_cache_dir(), FALSE, dt_image_t::flags, darktable_t::image_cache, PATH_MAX, and TRUE.
Referenced by dt_control_delete_images_job_run(), dt_control_local_copy_images_job_run(), dt_film_remove(), dt_image_remove(), and local_copy_member().
| int dt_image_local_copy_set | ( | const int32_t | imgid | ) |
References _copy_text_sidecar_if_present(), darktable, dt_control_log(), dt_control_queue_redraw_center(), dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), dt_image_choose_input_path(), DT_IMAGE_LOCAL_COPY, DT_IMAGE_PATH_LOCAL_COPY, DT_IMAGE_PATH_LOCAL_COPY_LEGACY, DT_IMAGE_PATH_NONE, dt_image_t::flags, dt_image_t::fullpath, darktable_t::image_cache, dt_image_t::local_copy_legacy_path, dt_image_t::local_copy_path, PATH_MAX, and TRUE.
Referenced by dt_control_local_copy_images_job_run(), and local_copy_member().
| void dt_image_local_copy_synch | ( | ) |
| int dt_image_monochrome_flags | ( | const dt_image_t * | img | ) |
returns the bitmask containing info about monochrome images
References DT_IMAGE_MONOCHROME, DT_IMAGE_MONOCHROME_BAYER, DT_IMAGE_MONOCHROME_PREVIEW, and dt_image_t::flags.
Referenced by _dev_auto_apply_presets(), _gui_presets_popup_menu_show_internal(), _image_set_monochrome_flag(), _metadata_get_flags(), dt_gui_presets_autoapply_for_module(), dt_image_cache_write_release(), dt_image_from_stmt(), dt_image_print_debug_info(), and dt_imageio_open().
| int32_t dt_image_move | ( | const int32_t | imgid, |
| const int32_t | filmid | ||
| ) |
physically move image with imgid and its duplicates to the film roll given by filmid. returns -1 on error, 0 on success.
References dt_image_rename().
Referenced by dt_control_move_images_job_run(), and dt_lua_move_image().
| void dt_image_path_append_version | ( | const int32_t | imgid, |
| char * | pathname, | ||
| size_t | pathname_len | ||
| ) |
appends version numbering for duplicated images.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, and dt_image_path_append_version_no_db().
Referenced by _write_sidecar_file_from_image_locked(), dt_control_delete_images_job_run(), dt_exif_xmp_attach_export(), dt_exif_xmp_read_string(), dt_image_local_copy_reset(), dt_image_rename(), image_tostring(), sidecar_member(), store(), and store_wrapper().
| void dt_image_path_append_version_no_db | ( | int | version, |
| char * | pathname, | ||
| size_t | pathname_len | ||
| ) |
appends version numbering for duplicated images without querying the db.
References c, c2, and dt_free.
Referenced by dt_control_crawler_run(), and dt_image_path_append_version().
| void dt_image_print_debug_info | ( | const dt_image_t * | img, |
| const char * | context | ||
| ) |
debug helper: dump image flags and buffer details (DT_DEBUG_IMAGEIO)
References _image_buf_type_to_string(), _image_colorspace_to_string(), bit_depth, dt_iop_buffer_dsc_t::bpp, bpp, dt_iop_buffer_dsc_t::channels, dt_image_t::colorspace, dt_image_t::crop_height, dt_image_t::crop_width, dt_image_t::crop_x, dt_image_t::crop_y, dt_iop_buffer_dsc_t::cst, dt_image_t::d65_color_matrix, dt_iop_buffer_dsc_t::datatype, dt_image_t::dsc, DT_DEBUG_IMAGEIO, DT_IMAGE_4BAYER, DT_IMAGE_AUTO_PRESETS_APPLIED, DT_IMAGE_HAS_ADDITIONAL_DNG_TAGS, DT_IMAGE_HAS_TXT, DT_IMAGE_HAS_WAV, dt_image_is_hdr(), dt_image_is_ldr(), dt_image_is_monochrome(), dt_image_is_raw(), DT_IMAGE_LOCAL_COPY, DT_IMAGE_MONOCHROME_BAYER, dt_image_monochrome_flags(), DT_IMAGE_MONOCHROME_PREVIEW, DT_IMAGE_NO_LEGACY_PRESETS, DT_IMAGE_REJECTED, DT_IMAGE_REMOVE, DT_IMAGE_S_RAW, dt_image_use_monochrome_workflow(), dt_print(), dt_image_t::filename, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, flags, dt_image_t::fullpath, dt_image_t::has_audio, dt_image_t::has_localcopy, dt_image_t::height, dt_image_t::id, dt_image_t::is_bw, dt_image_t::is_bw_flow, dt_image_t::is_hdr, dt_image_t::orientation, dt_image_t::p_height, dt_image_t::p_width, dt_image_t::pixel_aspect_ratio, dt_iop_buffer_dsc_t::processed_maximum, dt_image_t::raw_black_level, dt_iop_buffer_dsc_t::raw_black_level, dt_image_t::raw_black_level_separate, dt_image_t::raw_white_point, dt_iop_buffer_dsc_t::raw_white_point, dt_iop_buffer_dsc_t::rawprepare, TYPE_FLOAT, TYPE_UINT16, TYPE_UINT8, TYPE_UNKNOWN, and dt_image_t::width.
Referenced by reload_defaults().
| void dt_image_print_exif | ( | const dt_image_t * | img, |
| char * | line, | ||
| size_t | line_len | ||
| ) |
prints a one-line exif information string.
References dt_free, dt_util_format_exposure(), dt_image_t::exif_aperture, dt_image_t::exif_exposure, dt_image_t::exif_focal_length, and dt_image_t::exif_iso.
Referenced by _get_base_value(), and finalize_store().
| int dt_image_read_duplicates | ( | const uint32_t | id, |
| const char * | filename, | ||
| const gboolean | clear_selection | ||
| ) |
References _image_duplicate_with_version_ext(), c3, darktable_t::collection, darktable, darktable_t::db, DT_COLLECTION_CHANGE_RELOAD, DT_COLLECTION_PROP_UNDEF, dt_collection_update_query(), dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_exif_xmp_read(), dt_free, dt_free_gpointer(), dt_grouping_add_to_group(), dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), dt_image_find_xmps(), dt_selection_clear(), dt_image_t::group_id, darktable_t::image_cache, PATH_MAX, darktable_t::selection, dt_image_t::version, and void().
Referenced by _image_import_internal(), and _import_image().
| void dt_image_refresh_makermodel | ( | dt_image_t * | img | ) |
Refresh makermodel from the raw and exif values
References dt_image_t::camera_alias, dt_image_t::camera_maker, dt_image_t::camera_makermodel, dt_image_t::camera_model, dt_imageio_lookup_makermodel(), dt_image_t::exif_maker, and dt_image_t::exif_model.
Referenced by _exif_decode_exif_data(), dt_image_from_stmt(), and dt_imageio_open_rawspeed().
| void dt_image_remove | ( | const int32_t | imgid | ) |
removes the given image from the database.
References darktable, darktable_t::db, dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_grouping_remove_from_group(), dt_image_cache_get(), dt_image_cache_read_release(), dt_image_cache_remove(), dt_image_local_copy_reset(), dt_mipmap_cache_remove(), darktable_t::image_cache, darktable_t::mipmap_cache, and TRUE.
Referenced by _pop_undo(), dt_control_delete_images_job_run(), dt_control_remove_images_job_run(), and dt_lua_delete_image().
| int32_t dt_image_rename | ( | const int32_t | imgid, |
| const int32_t | filmid, | ||
| const gchar * | newname | ||
| ) |
physically move image with imgid and its duplicates to the film roll given by filmid and the name given by newname. returns -1 on error, 0 on success.
References _move_text_sidecar_if_present(), darktable, darktable_t::db, dt_control_log(), dt_database_get(), DT_DEBUG_SQLITE3_BIND_INT, DT_DEBUG_SQLITE3_PREPARE_V2, dt_free, dt_image_cache_get(), dt_image_cache_read_release(), DT_IMAGE_CACHE_SAFE, dt_image_cache_write_release(), dt_image_choose_input_path(), dt_image_full_path(), dt_image_path_append_version(), DT_MAX_FILENAME_LEN, FALSE, dt_image_t::filename, dt_image_t::film_id, darktable_t::image_cache, PATH_MAX, and TRUE.
Referenced by dt_image_move(), and dt_lua_move_image().
| gboolean dt_image_safe_remove | ( | const int32_t | imgid | ) |
References dt_image_full_path(), dt_image_get_xmp_mode(), PATH_MAX, and TRUE.
Referenced by dt_control_remove_images_job_run(), and dt_film_remove().
| void dt_image_set_datetime | ( | const GList * | imgs, |
| const char * | datetime, | ||
| const gboolean | undo_on | ||
| ) |
References _datetime_undo_data_free(), _image_set_datetime(), _pop_undo(), darktable, DT_UNDO_DATETIME, dt_undo_end_group(), dt_undo_record(), dt_undo_start_group(), and darktable_t::undo.
Referenced by dt_control_datetime_job_run().
| void dt_image_set_datetimes | ( | const GList * | imgs, |
| const GArray * | dtime, | ||
| const gboolean | undo_on | ||
| ) |
References _datetime_undo_data_free(), _image_set_datetimes(), _pop_undo(), darktable, DT_UNDO_DATETIME, dt_undo_end_group(), dt_undo_record(), dt_undo_start_group(), and darktable_t::undo.
Referenced by dt_control_datetime_job_run().
| void dt_image_set_flip | ( | const int32_t | imgid, |
| const dt_image_orientation_t | orientation | ||
| ) |
References darktable, dt_control_save_xmp(), dt_history_db_get_next_history_num(), dt_history_db_write_history_item(), dt_history_set_end(), dt_image_cache_get(), DT_IMAGE_CACHE_RELAXED, dt_image_cache_write_release(), dt_mipmap_cache_remove(), dt_image_t::history_hash, darktable_t::image_cache, darktable_t::mipmap_cache, and TRUE.
Referenced by dt_image_flip().
| void dt_image_set_images_locations | ( | const GList * | imgs, |
| const GArray * | gloc, | ||
| const gboolean | undo_on | ||
| ) |
set images locations lon/lat/ele
References _geotag_undo_data_free(), _image_set_images_locations(), _pop_undo(), darktable, dt_undo_end_group(), DT_UNDO_GEOTAG, dt_undo_record(), dt_undo_start_group(), and darktable_t::undo.
Referenced by dt_control_gpx_apply_job_run().
| void dt_image_set_location | ( | const int32_t | imgid, |
| const dt_image_geoloc_t * | geoloc, | ||
| const gboolean | undo_on, | ||
| const gboolean | group_on | ||
| ) |
set image location lon/lat/ele
References dt_act_on_get_images(), dt_grouping_add_grouped_images(), dt_image_set_locations(), and UNKNOWN_IMAGE.
Referenced by dt_lightroom_import().
| void dt_image_set_locations | ( | const GList * | img, |
| const dt_image_geoloc_t * | geoloc, | ||
| const gboolean | undo_on | ||
| ) |
set images location lon/lat/ele
References _geotag_undo_data_free(), _image_set_location(), _pop_undo(), darktable, dt_undo_end_group(), DT_UNDO_GEOTAG, dt_undo_record(), dt_undo_start_group(), and darktable_t::undo.
Referenced by _drag_and_drop_received(), and dt_image_set_location().
| void dt_image_set_monochrome_flag | ( | const int32_t | imgid, |
| gboolean | monochrome | ||
| ) |
set the monochrome flags if monochrome is TRUE and clear it otherwise
References _image_set_monochrome_flag(), and TRUE.
Referenced by dt_control_monochrome_images_job_run().
| void dt_image_set_xmp_rating | ( | dt_image_t * | img, |
| const int | rating | ||
| ) |
References DT_IMAGE_REJECTED, DT_VIEW_RATINGS_MASK, and dt_image_t::flags.
Referenced by _exif_decode_exif_data(), and _exif_decode_xmp_data().
| void dt_image_synch_all_xmp | ( | const gchar * | pathname | ) |
References dt_control_save_xmps(), dt_image_get_id_full_path(), dt_image_get_xmp_mode(), FALSE, and UNKNOWN_IMAGE.
Referenced by _image_import_internal(), dt_control_delete_images_job_run(), and dt_control_remove_images_job_run().
| void dt_image_synch_xmp | ( | const int | selected | ) |
References dt_act_on_get_images(), dt_control_save_xmps(), dt_image_synch_xmps(), and FALSE.
Referenced by _attach_selected_tag(), _event_dnd_received(), _pop_menu_attached_attach_to_all(), dt_lightroom_import(), dt_lua_tag_attach(), dt_lua_tag_detach(), exif_datetime_taken_member(), metadata_member(), set_params(), and tag_delete().
| void dt_image_synch_xmps | ( | const GList * | img | ) |
References dt_control_save_xmps(), dt_image_get_xmp_mode(), and FALSE.
Referenced by _apply_rename_path(), _detach_selected_tag(), _new_button_clicked(), _pop_menu_dictionary_delete_node(), _pop_menu_dictionary_delete_tag(), _pop_menu_dictionary_edit_tag(), _undo_do_undo_redo(), _write_metadata(), dt_image_synch_xmp(), and set_params().
| gboolean dt_image_use_monochrome_workflow | ( | const dt_image_t * | img | ) |
returns true if the image has been tested to be monochrome and the image wants monochrome workflow
References DT_IMAGE_MONOCHROME, DT_IMAGE_MONOCHROME_BAYER, DT_IMAGE_MONOCHROME_PREVIEW, DT_IMAGE_MONOCHROME_WORKFLOW, and dt_image_t::flags.
Referenced by dt_image_cache_write_release(), dt_image_from_stmt(), and dt_image_print_debug_info().
| int dt_image_write_sidecar_file | ( | const int32_t | imgid | ) |
References _write_sidecar_file_from_image_locked(), darktable, DT_DEBUG_CONTROL, dt_image_cache_get(), DT_IMAGE_CACHE_MINIMAL, dt_image_cache_write_release(), dt_image_get_xmp_mode(), dt_print(), and darktable_t::image_cache.
Referenced by dt_control_save_xmps_job_run(), sync_db_to_xmp(), sync_newest_to_oldest(), and sync_oldest_to_newest().
|
static |
Referenced by dt_image_altered(), and dt_image_cleanup().
|
static |
Referenced by _image_stmt_mutex_ensure(), dt_image_altered(), and dt_image_cleanup().
|
static |
Referenced by _image_stmt_mutex_ensure().
|
static |
Referenced by _write_timestamp_get().
|
static |
Referenced by _write_timestamp_get(), _write_timestamp_set_now(), and _write_timestamp_stmt_ensure().
|
static |
Referenced by _write_timestamp_stmt_ensure().
|
static |
Referenced by _write_timestamp_set_now().