![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
What a photograph says about itself: the EXIF, IPTC and XMP tags a camera and a cataloguer write, read into and out of dt_image_t. More...
Go to the source code of this file.
Typedefs | |
| typedef enum dt_dng_illuminant_t | dt_dng_illuminant_t |
Enumerations | |
| enum | dt_dng_illuminant_t { DT_LS_Unknown = 0 , DT_LS_Daylight = 1 , DT_LS_Fluorescent = 2 , DT_LS_Tungsten = 3 , DT_LS_Flash = 4 , DT_LS_FineWeather = 9 , DT_LS_CloudyWeather = 10 , DT_LS_Shade = 11 , DT_LS_DaylightFluorescent = 12 , DT_LS_DayWhiteFluorescent = 13 , DT_LS_CoolWhiteFluorescent = 14 , DT_LS_WhiteFluorescent = 15 , DT_LS_WarmWhiteFluorescent = 16 , DT_LS_StandardLightA = 17 , DT_LS_StandardLightB = 18 , DT_LS_StandardLightC = 19 , DT_LS_D55 = 20 , DT_LS_D65 = 21 , DT_LS_D75 = 22 , DT_LS_D50 = 23 , DT_LS_ISOStudioTungsten = 24 , DT_LS_Other = 255 } |
Functions | |
| void | dt_exif_set_exiv2_taglist () |
| const GList * | dt_exif_get_exiv2_taglist () |
| int | dt_exif_read (dt_image_t *img, const char *path) |
| int | dt_exif_read_from_blob (dt_image_t *img, uint8_t *blob, const int size) |
| void | dt_exif_img_check_additional_tags (dt_image_t *img, const char *filename) |
| void | dt_exif_read_usercrop (dt_image_t *img, const char *filename) |
| int | dt_exif_write_blob (uint8_t *blob, uint32_t size, const char *path, const int compressed) |
| int | dt_exif_get_thumbnail (const char *path, uint8_t **buffer, size_t *size, char **mime_type, int *width, int *height, int min_width) |
| void | dt_exif_init () |
| void | dt_exif_cleanup () |
| char * | dt_exif_xmp_encode (const unsigned char *input, const int len, int *output_len) |
| char * | dt_exif_xmp_encode_internal (const unsigned char *input, const int len, int *output_len, gboolean do_compress) |
| unsigned char * | dt_exif_xmp_decode (const char *input, const int len, int *output_len) |
| dt_colorspaces_color_profile_type_t | dt_exif_get_color_space (const uint8_t *data, size_t size) |
| void | dt_exif_get_datetime_taken (const uint8_t *data, size_t size, char *datetime_taken) |
What a photograph says about itself: the EXIF, IPTC and XMP tags a camera and a cataloguer write, read into and out of dt_image_t.
This half of the old common/exif.cc names nothing above layer 1. The other half – the XMP sidecar that carries the development: history, masks, module order – reaches develop/ and imageio/, and lives in common/xmp_sidecar.h. The two met only in the XMP document, which is why they could be cut apart at all; what genuinely spans both is in metadata/exif_internal.h and is private to those two files.
Definition in file exif.h.
| typedef enum dt_dng_illuminant_t dt_dng_illuminant_t |
wrapper around exiv2, C++
| enum dt_dng_illuminant_t |
wrapper around exiv2, C++
| void dt_exif_cleanup | ( | ) |
Definition at line 2443 of file exif.cc.
Referenced by dt_cleanup().
| dt_colorspaces_color_profile_type_t dt_exif_get_color_space | ( | const uint8_t * | data, |
| size_t | size ) |
look for color space hints in data and tell the caller if it's sRGB, AdobeRGB or something else. used for mipmaps
Definition at line 2330 of file exif.cc.
References data, DT_COLORSPACE_ADOBERGB, DT_COLORSPACE_DISPLAY, DT_COLORSPACE_SRGB, and size.
Referenced by dt_imageio_jpeg_read_color_space().
| void dt_exif_get_datetime_taken | ( | const uint8_t * | data, |
| size_t | size, | ||
| char * | datetime_taken ) |
look for datetime_taken in data. used for gphoto downloads
Definition at line 2375 of file exif.cc.
References _find_datetime_taken(), data, and size.
| const GList * dt_exif_get_exiv2_taglist | ( | ) |
| int dt_exif_get_thumbnail | ( | const char * | path, |
| uint8_t ** | buffer, | ||
| size_t * | size, | ||
| char ** | mime_type, | ||
| int * | width, | ||
| int * | height, | ||
| int | min_width ) |
fetch largest exif thumbnail jpg bytestream into buffer
Get the largest possible thumbnail from the image
Definition at line 1929 of file exif.cc.
References DT_DEBUG_LIGHTTABLE, dt_print(), height, IS_NULL_PTR, memcpy(), preview, selected, size, WIDEN, and width.
Referenced by dt_imageio_large_thumbnail().
| void dt_exif_img_check_additional_tags | ( | dt_image_t * | img, |
| const char * | filename ) |
Reads exif tags that are not cached in the database
Definition at line 1055 of file exif.cc.
References _check_dng_opcodes(), _check_lens_correction_data(), _check_usercrop(), and WIDEN.
Referenced by dt_imageio_open_rawspeed().
| void dt_exif_init | ( | ) |
thread safe init and cleanup.
Definition at line 2403 of file exif.cc.
References dt_exif_log_handler().
Referenced by dt_init().
| int dt_exif_read | ( | dt_image_t * | img, |
| const char * | path ) |
read metadata from file with full path name, XMP data trumps IPTC data trumps EXIF data, store to image struct. returns 0 on success.
read the metadata of an image. XMP data trumps IPTC data trumps EXIF data
Definition at line 1994 of file exif.cc.
References _exif_decode_exif_data(), _exif_decode_iptc_data(), dt_datetime_unix_to_img(), dt_exif_decode_xmp_data(), dt_image_flags_from_extension(), DT_IMAGE_HDR, DT_IMAGE_LDR, DT_IMAGE_RAW, DT_IMAGE_S_RAW, dt_image_t::exif_inited, dt_image_t::flags, dt_image_t::height, res, WIDEN, and dt_image_t::width.
Referenced by _control_import_job_run(), _image_import_internal(), _set_test_path(), dt_control_refresh_exif_run(), dt_imageio_open_j2k(), dt_imageio_open_jpeg(), dt_imageio_open_png(), dt_imageio_open_rawspeed(), dt_imageio_open_tiff(), and update_preview_cb().
| int dt_exif_read_from_blob | ( | dt_image_t * | img, |
| uint8_t * | blob, | ||
| const int | size ) |
read exif data to image struct from given data blob, wherever you got it from.
Definition at line 1909 of file exif.cc.
References _exif_decode_exif_data(), dt_image_t::filename, res, and size.
Referenced by dt_imageio_open_exr().
| void dt_exif_read_usercrop | ( | dt_image_t * | img, |
| const char * | filename ) |
Reads only the DNG DefaultUserCrop tag into img->usercrop / img->usercrop_status.
Narrow entry point for consumers that need the camera framing without decoding the raw and without the side effects of the full additional-tags read (DNG opcodes allocate gain maps). Always leaves a definite status, never DT_IMAGE_USERCROP_UNKNOWN.
Definition at line 1031 of file exif.cc.
References _check_usercrop(), DT_IMAGE_USERCROP_ABSENT, dt_image_t::usercrop, dt_image_t::usercrop_status, and WIDEN.
Referenced by dt_image_resolve_usercrop().
| void dt_exif_set_exiv2_taglist | ( | ) |
set the list of available tags from Exvi2
Definition at line 271 of file exif.cc.
References _get_exiv2_type(), _get_xmp_tags(), dt_util_dstrcat(), and exiv2_taglist.
Referenced by dt_exif_get_exiv2_taglist(), and dt_init().
| int dt_exif_write_blob | ( | uint8_t * | blob, |
| uint32_t | size, | ||
| const char * | path, | ||
| const int | compressed ) |
write blob to file exif. merges with existing exif information.
Definition at line 2057 of file exif.cc.
References dt_remove_exif_keys(), i, key, size, and WIDEN.
Referenced by dt_imageio_write_dng(), write_image(), write_image(), write_image(), and write_image().
| unsigned char * dt_exif_xmp_decode | ( | const char * | input, |
| const int | len, | ||
| int * | output_len ) |
Definition at line 2207 of file exif.cc.
References dt_free, factor, i, IS_NULL_PTR, and TO_BINARY.
Referenced by add_preset(), dt_exif_xmp_read(), dt_presets_import_from_file(), dt_style_plugin_save(), init_presets(), read_history_v1(), read_history_v2(), read_masks(), and read_masks_v3().
| char * dt_exif_xmp_encode | ( | const unsigned char * | input, |
| const int | len, | ||
| int * | output_len ) |
encode / decode op params.
Used by the XMP sidecar to serialise module parameter blobs, and by anything that has to read one back; they are here rather than beside the sidecar because they are a codec, not a document format – common/styles.c and common/presets.c use them too.
Definition at line 2116 of file exif.cc.
References COMPRESS_THRESHOLD, dt_conf_get_string(), dt_exif_xmp_encode_internal(), dt_free, FALSE, and TRUE.
Referenced by _exif_xmp_append_history_hash(), _init_presets(), _write_item(), _xmp_append_history(), _xmp_append_mask(), and dt_presets_save_to_file().
| char * dt_exif_xmp_encode_internal | ( | const unsigned char * | input, |
| const int | len, | ||
| int * | output_len, | ||
| gboolean | do_compress ) |
Definition at line 2142 of file exif.cc.
References dt_free, factor, i, IS_NULL_PTR, and MIN.
Referenced by dt_exif_xmp_encode(), encode_colorchecker(), and encode_tonecurve().