112#include <glib/gstdio.h>
134 char *mime_type = NULL;
145 if(strcmp(mime_type,
"image/jpeg") == 0)
153 if(!*buffer)
goto error;
155 *th_width = jpg.
width;
168 else if(!strcmp(mime_type,
"image/tiff") || !strcmp(mime_type,
"image/x-tiff"))
184 "[dt_imageio_large_thumbnail] error: Not a supported thumbnail image format or broken thumbnail: %s\n",
200 const int32_t in_width = *
width;
201 const int32_t in_height = *
height;
202 if(in_width < 1 || in_height < 1)
return FALSE;
207 const int32_t left = CLAMP((int32_t)roundf(box[1] * in_width), 0, in_width - 1);
208 const int32_t
top = CLAMP((int32_t)roundf(box[0] * in_height), 0, in_height - 1);
209 const int32_t right = CLAMP((int32_t)roundf(box[3] * in_width), left + 1, in_width);
210 const int32_t bottom = CLAMP((int32_t)roundf(box[2] * in_height),
top + 1, in_height);
212 const int32_t out_width = right - left;
213 const int32_t out_height = bottom -
top;
214 if(out_width == in_width && out_height == in_height)
return FALSE;
219 for(int32_t j = 0; j < out_height; j++)
221 const uint8_t *
const source = buffer + 4 * ((size_t)(j +
top) * in_width + left);
222 uint8_t *
const destination = buffer + 4 * (size_t)j * out_width;
223 memmove(destination, source, 4 * (
size_t)out_width);
235 int32_t thumb_width = 0, thumb_height = 0;
236 gboolean mono =
FALSE;
240 if((thumb_width < 32) || (thumb_height < 32) || (
IS_NULL_PTR(tmp)))
244 for(
int y = 0; y < thumb_height; y++)
246 uint8_t *
in = (uint8_t *)tmp + (
size_t)4 * y * thumb_width;
247 for(
int x = 0;
x < thumb_width;
x++,
in += 4)
249 if((
in[0] !=
in[1]) || (
in[0] !=
in[2]) || (
in[1] !=
in[2]))
259 dt_print(
DT_DEBUG_IMAGEIO,
"[dt_imageio_has_mono_preview] testing `%s', yes/no %i, %ix%i\n", filename, mono, thumb_width, thumb_height);
266 const int fwd,
const int fht,
const int stride,
272 for(
int j = 0; j < ht; j++)
memcpy(
out + (
size_t)j *
bpp * wd,
in + (
size_t)j * stride,
bpp * wd);
276 int si =
bpp, sj = wd *
bpp;
284 jj = (int)fht - jj - 1;
289 ii = (int)fwd - ii - 1;
293 for(
int j = 0; j < ht; j++)
295 char *out2 =
out + (size_t)labs(sj) * jj + (size_t)labs(si) * ii + (size_t)sj * j;
296 const char *in2 =
in + (size_t)stride * j;
297 for(
int i = 0;
i < wd;
i++)
307 const int ch,
const int wd,
const int ht,
const int fwd,
308 const int fht,
const int stride,
311 const float scale = 1.0f / (white - black);
315 for(
int j = 0; j < ht; j++)
316 for(
int i = 0;
i < wd;
i++)
317 for(
int k = 0;
k <
ch;
k++)
318 out[4 * ((
size_t)j * wd +
i) +
k] = (
in[(size_t)j * stride + (size_t)
ch *
i +
k] - black) * scale;
322 int si = 4, sj = wd * 4;
330 jj = (int)fht - jj - 1;
335 ii = (int)fwd - ii - 1;
339 for(
int j = 0; j < ht; j++)
341 float *out2 =
out + (size_t)labs(sj) * jj + (size_t)labs(si) * ii + sj * j;
342 const uint8_t *in2 =
in + (size_t)stride * j;
343 for(
int i = 0;
i < wd;
i++)
345 for(
int k = 0;
k <
ch;
k++) out2[
k] = (in2[
k] - black) * scale;
421 const char *c = filename + strlen(filename);
422 while(c > filename && *c !=
'.') c--;
423 if(*c !=
'.')
return FALSE;
429 const char *c = filename + strlen(filename);
430 while(c > filename && *c !=
'.') c--;
431 if(*c !=
'.')
return FALSE;
437 const char *c = filename + strlen(filename);
438 while(c > filename && *c !=
'.') c--;
439 if(*c !=
'.')
return FALSE;
462 char *saveptr = NULL;
463 for(
char *entry = strtok_r(list,
",", &saveptr); !
IS_NULL_PTR(entry);
464 entry = strtok_r(NULL,
",", &saveptr))
466 if(!g_ascii_strcasecmp(entry, elem))
return TRUE;
475 gboolean is_handled =
FALSE;
480 const char *dot = g_strrstr(filename,
".");
481 const char *ext =
IS_NULL_PTR(dot) ? NULL : dot + 1;
497 const char *iolib = (is_handled) ?
"Libraw" :
"Rawspeed";
600 *num = (int)(
in * *den + .5f);
601 while(fabsf(*num / (
float)*den -
in) > 0.001f)
604 *num = (int)(
in * *den + .5f);
610 const gboolean copy_metadata,
const gboolean export_masks,
615 if(strcmp(format->
mime(format_params),
"x-copy") == 0)
617 return format->
write_image(format_params, filename, NULL, icc_type, icc_filename, NULL, 0, imgid, num, total, NULL,
622 FALSE,
FALSE, NULL, copy_metadata, export_masks, icc_type, icc_filename, icc_intent,
623 storage, storage_params, num, total, metadata, NULL);
632 dt_control_alert(_(
"Export failed"), _(
"cannot find the style to apply during export."),
633 format_params->
style);
641 for(GList *st_items = style_items; st_items; st_items = g_list_next(st_items))
657 fprintf(stderr,
"[dt_imageio_export_with_flags] ");
660 fprintf(stderr,
"appending style `%s'\n", format_params->
style);
662 else fprintf(stderr,
"\n");
664 for(GList *nodes =
pipe->nodes; nodes; nodes = g_list_next(nodes))
670 fprintf(stderr,
" %s",
piece->module->op);
673 fprintf(stderr,
" (%i)\n", cnt);
692 const double image_ratio = (
double)
pipe->processed_width / (
double)
pipe->processed_height;
694 if(scale_factor > 0.0)
696 *scale = fmin(scale_factor, 1.);
719 *scale = fmin(scale_x, scale_y);
722 if(image_ratio > 1.0)
728 else if(image_ratio < 1.0)
758 *scale = fmin(scale_x, scale_y);
770 outbuf[4 *
k + c] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + c] * 255.f), 0.f, 255.f);
780 outbuf[4 *
k + 0] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 2] * 255.f), 0.f, 255.f);
781 outbuf[4 *
k + 1] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 1] * 255.f), 0.f, 255.f);
782 outbuf[4 *
k + 2] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 0] * 255.f), 0.f, 255.f);
783 outbuf[4 *
k + 3] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 3] * 255.f), 0.f, 255.f);
794 outbuf[4 *
k + c] = (uint16_t)CLAMP(roundf(inbuf[4 *
k + c] * 65535.f), 0.f, 65535.f);
808 const gboolean display_byteorder,
const gboolean thumbnail_export)
813 if(display_byteorder)
820 uint8_t *thumbnail_buf = outbuf;
822 for(
size_t k = 0;
k < pixels / 4;
k++) thumbnail_buf[4 *
k + 3] = UINT8_MAX;
831 uint16_t *thumbnail_buf = outbuf;
833 for(
size_t k = 0;
k < pixels / 4;
k++) thumbnail_buf[4 *
k + 3] = UINT16_MAX;
838 memcpy(outbuf,
data,
sizeof(float_t) * pixels);
842 float *thumbnail_buf = outbuf;
844 for(
size_t k = 0;
k < pixels / 4;
k++) thumbnail_buf[4 *
k + 3] = 1.0f;
852 const gboolean ignore_exif,
const gboolean display_byteorder,
853 const gboolean high_quality,
const double scale_factor,
const gboolean thumbnail_export,
854 const gboolean ignore_history,
const char *filter,
const gboolean copy_metadata,
855 const gboolean export_masks,
889 int res = thumbnail_export
899 pipe.shutdown_ext = shutdown;
902 const gboolean use_style = !thumbnail_export && format_params->
style[0] !=
'\0';
936 const size_t buf_width = buf.
width;
937 const size_t buf_height = buf.
height;
961 &
pipe.processed_height);
972 "[dt_imageio_export] (direct) image input %ix%i, turned to output %ix%i, will be exported to fit %ix%i "
973 "--> final size is %ix%i\n",
978 const int bpp = format->
bpp(format_params);
985 dt_show_times(&start, thumbnail_export ?
"[dev_process_thumbnail] pixel pipeline processing thread"
986 :
"[dev_process_export] pixel pipeline processing thread");
1018 &
data, &cache_entry)
1032 size_t channel_size =
sizeof(float_t);
1034 channel_size =
sizeof(uint8_t);
1036 channel_size =
sizeof(uint16_t);
1053 format_params->
width =
pipe.backbuf.width;
1060 uint8_t *exif_profile = NULL;
1064 gboolean from_cache =
TRUE;
1074 res = format->
write_image(format_params, filename, outbuf, icc_type, icc_filename, exif_profile, length, imgid,
1075 num, total, &
pipe, export_masks);
1091 if(!thumbnail_export && strcmp(format->
mime(format_params),
"memory")
1095 format_params, storage, storage_params);
1115 const char *filename,
1119 if(!g_file_test(filename, G_FILE_TEST_IS_REGULAR))
1163 _(
"Not enough memory to load the image at full size.\n"
1164 "Close other applications or add more RAM to your system."),
1170 fprintf(stderr,
"[imageio] The file %s is supported by none of our decoders.\n", filename);
1171 dt_control_log(_(
"The file `%s` is supported by none of our decoders."), filename);
1191 memset(buf, 0,
sizeof(*buf));
1213 char *mk,
int mk_len,
char *md,
int md_len,
1214 char *al,
int al_len)
static void error(char *msg)
void cleanup(dt_imageio_module_format_t *self)
The colour-profile module's API: which profiles exist, and how to apply one.
static dt_aligned_pixel_t sRGB
const dt_colormatrix_t dt_aligned_pixel_t out
gchar * dt_conf_get_string(const char *name)
Read the stored string for name as a private copy.
void dt_image_buffer_resolve_flags(dt_image_t *img)
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_control_alert_once(const char *title, const char *message, const char *item)
dt_control_alert() for a failure that repeats as long as its cause lasts – memory running short,...
void dt_control_alert(const char *title, const char *message, const char *item)
Tell the user something that must not go unseen: what it says stays true after a toast would have fad...
void dt_control_log(const char *msg,...)
void dt_dev_pop_history_items(dt_develop_t *dev)
Thread-safe wrapper around dt_dev_pop_history_items_ext(), then update GUI.
void dt_dev_set_history_end_ext(struct dt_develop_t *dev, const uint32_t index)
Set the history end index (GUI perspective).
void dt_dev_pixelpipe_propagate_formats(dt_dev_pixelpipe_t *pipe)
void dt_dev_pixelpipe_get_roi_out(dt_dev_pixelpipe_t *pipe, const int width_in, const int height_in, int *width, int *height)
dt_atomic_set_uint64 & dev
void dt_dev_cleanup(dt_develop_t *dev)
dt_dev_image_storage_t dt_dev_load_image(dt_develop_t *dev, const int32_t imgid)
void dt_dev_init(dt_develop_t *dev, int32_t gui_attached)
static int dt_pthread_rwlock_wrlock(dt_pthread_rwlock_t *rwlock) ACQUIRE(rwlock) NO_THREAD_SAFETY_ANALYSIS
static int dt_pthread_rwlock_unlock(dt_pthread_rwlock_t *rwlock) RELEASE_GENERIC(rwlock) NO_THREAD_SAFETY_ANALYSIS
int dt_exif_get_thumbnail(const char *path, uint8_t **buffer, size_t *size, char **mime_type, int *width, int *height, int min_width)
What a photograph says about itself: the EXIF, IPTC and XMP tags a camera and a cataloguer write,...
memcpy(roundtrip, origin, sizeof(roundtrip))
float dt_boundingbox_t[4]
dt_imageio_retval_t
Return value of image io functions: loading, exporting, and making a thumbnail.
@ DT_IMAGEIO_UNSUPPORTED_FEATURE
@ DT_IMAGEIO_FILE_CORRUPTED
@ DT_IMAGEIO_PROCESSING_FAILED
@ DT_IMAGEIO_UNSUPPORTED_CAMERA
gboolean dt_image_ext_is_ldr(const char *ext)
gboolean dt_image_ext_is_raw(const char *ext)
gboolean dt_image_ext_is_hdr(const char *ext)
dt_imageio_retval_t dt_imageio_open_avif(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
gboolean _apply_style_before_export(dt_develop_t *dev, const dt_imageio_module_data_t *format_params, const int32_t imgid)
void _clamp_float_to_uint8(const float *const inbuf, uint8_t *const outbuf, const size_t processed_width, const size_t processed_height)
void dt_imageio_flip_buffers_ui8_to_float(float *out, const uint8_t *in, const float black, const float white, const int ch, const int wd, const int ht, const int fwd, const int fht, const int stride, const dt_image_orientation_t orientation)
int dt_imageio_is_hdr(const char *filename)
dt_imageio_retval_t dt_imageio_export_with_flags(const int32_t imgid, const char *filename, dt_imageio_module_format_t *format, dt_imageio_module_data_t *format_params, const gboolean ignore_exif, const gboolean display_byteorder, const gboolean high_quality, const double scale_factor, const gboolean thumbnail_export, const gboolean ignore_history, const char *filter, const gboolean copy_metadata, const gboolean export_masks, dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename, dt_iop_color_intent_t icc_intent, dt_imageio_module_storage_t *storage, dt_imageio_module_data_t *storage_params, int num, int total, dt_export_metadata_t *metadata, dt_atomic_int *shutdown)
gboolean dt_imageio_lookup_makermodel(const char *maker, const char *model, char *mk, int mk_len, char *md, int md_len, char *al, int al_len)
dt_imageio_retval_t dt_imageio_open(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
void dt_imageio_close_standalone(dt_mipmap_buffer_t *buf)
Release a buffer from dt_imageio_open_standalone(). NULL-safe, and safe to call on a buffer whose ope...
void _swap_byteorder_float_to_uint8(const float *const restrict inbuf, uint8_t *const outbuf, const size_t processed_width, const size_t processed_height)
dt_imageio_retval_t dt_imageio_open_raster(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
void _filter_pipeline(const char *filter, dt_dev_pixelpipe_t *pipe)
static gboolean _get_export_size(const dt_dev_pixelpipe_t *pipe, const double scale_factor, double *scale, int width, int height, int *processed_width, int *processed_height)
dt_imageio_retval_t dt_imageio_open_standalone(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
Decode a file into a buffer the CALLER owns, with no cache involvement.
gboolean dt_imageio_is_raster(const char *filename)
gboolean dt_imageio_has_mono_preview(const char *filename)
int dt_imageio_export(const int32_t imgid, const char *filename, dt_imageio_module_format_t *format, dt_imageio_module_data_t *format_params, const double scale_factor, const gboolean high_quality, const gboolean copy_metadata, const gboolean export_masks, dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename, dt_iop_color_intent_t icc_intent, dt_imageio_module_storage_t *storage, dt_imageio_module_data_t *storage_params, int num, int total, dt_export_metadata_t *metadata)
void dt_imageio_to_fractional(float in, uint32_t *num, uint32_t *den)
gboolean dt_imageio_crop_thumbnail(const dt_boundingbox_t box, uint8_t *const buffer, int32_t *width, int32_t *height)
Crop an 8-bit RGBA preview buffer in place to a normalized bounding box.
static dt_imageio_retval_t _decoder_reason(const dt_imageio_retval_t reason, const dt_imageio_retval_t ret)
gboolean dt_imageio_is_handled_by_libraw(dt_image_t *img, const char *filename)
dt_imageio_retval_t dt_imageio_open_hdr(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
static void _export_convert_output(const float *const data, void *const outbuf, const int bpp, const size_t width, const size_t height, const gboolean display_byteorder, const gboolean thumbnail_export)
Convert the pipeline's float RGBA output into outbuf, at the depth the format writes: 8 bits (in disp...
dt_imageio_retval_t dt_imageio_open_raw(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
static gboolean _is_in_list(const char *elem, char *list)
Is elem one of the comma-separated entries of list?
gboolean dt_imageio_is_raw(const char *filename)
int dt_imageio_large_thumbnail(const char *filename, uint8_t **buffer, int32_t *th_width, int32_t *th_height, dt_colorspaces_color_profile_type_t *color_space, const int width, const int height)
Load the thumbnail embedded into a RAW file having at least the size MAX(width, height) x MAX(width,...
void _print_export_debug(dt_dev_pixelpipe_t *pipe, dt_imageio_module_data_t *format_params, const gboolean use_style)
__DT_CLONE_TARGETS__ void dt_imageio_flip_buffers(char *out, const char *in, const size_t bpp, const int wd, const int ht, const int fwd, const int fht, const int stride, const dt_image_orientation_t orientation)
void _export_final_buffer_to_uint16(const float *const restrict inbuf, uint16_t *const outbuf, const size_t processed_width, const size_t processed_height)
dt_imageio_retval_t dt_imageio_open_exr(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
dt_imageio_retval_t dt_imageio_open_heif(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
dt_imageio_retval_t dt_imageio_open_j2k(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
int dt_imageio_jpeg_decompress_header(const void *in, size_t length, dt_imageio_jpeg_t *jpg)
dt_imageio_retval_t dt_imageio_open_jpeg(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
int dt_imageio_jpeg_decompress(dt_imageio_jpeg_t *jpg, uint8_t *out)
dt_imageio_retval_t dt_imageio_open_libraw(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
gboolean dt_libraw_lookup_makermodel(const char *maker, const char *model, char *mk, int mk_len, char *md, int md_len, char *al, int al_len)
@ FORMAT_FLAGS_SUPPORT_XMP
@ FORMAT_FLAGS_NO_TMPFILE
dt_imageio_retval_t dt_imageio_open_pfm(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
dt_imageio_retval_t dt_imageio_open_png(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
dt_imageio_retval_t dt_imageio_open_pnm(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
const dt_colorspaces_color_profile_t * dt_colorspaces_get_output_profile(const int32_t imgid, dt_colorspaces_color_profile_type_t *over_type, const char *over_filename)
gboolean dt_rawspeed_lookup_makermodel(const char *maker, const char *model, char *mk, int mk_len, char *md, int md_len, char *al, int al_len)
dt_imageio_retval_t dt_imageio_open_rawspeed(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
dt_imageio_retval_t dt_imageio_open_rgbe(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
dt_imageio_retval_t dt_imageio_open_tiff(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
gboolean dt_imageio_tiff_decode_blob(const uint8_t *const blob, const size_t bufsize, uint8_t **out, int32_t *width, int32_t *height)
Decode a TIFF held in memory into 8-bit RGBx, for the previews raw files embed.
dt_imageio_retval_t dt_imageio_open_webp(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
void dt_ioppr_resync_modules_order(dt_develop_t *dev)
Update dev->iop module order values from dev->iop_order_list.
void dt_ioppr_update_for_style_items(dt_develop_t *dev, GList *st_items, gboolean append)
Update dev->iop_order_list with modules referenced by style items.
int dt_ioppr_check_iop_order(dt_develop_t *dev, const int32_t imgid, const char *msg)
Debug helper to validate the current order for a develop context.
static const dt_dev_pixelpipe_t * pipe
static const dt_dev_pixelpipe_t const dt_dev_pixelpipe_iop_t * piece
int32_t dt_get_debug_flags(void)
void dt_print(dt_debug_thread_t thread, const char *msg,...) __attribute__((format(printf
Print to stdout when thread is enabled, prefixed with seconds since startup.
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
#define CLAMPF(a, mn, mx)
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
dt_imageio_retval_t status
dt_colorspaces_color_profile_type_t color_space
#define dt_mipmap_cache_get(B, C, D, E, F)
#define dt_mipmap_cache_release(B)
#define __OMP_PARALLEL_FOR__(...)
#define DT_PATH_MAX
Buffer size for a filesystem path anywhere in Ansel.
void dt_dev_pixelpipe_cache_ref_count_entry(gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Take or release one reference on a cache line. A referenced line is never evicted,...
void dt_dev_pixelpipe_cache_rdlock_entry(gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Lock or release the read lock on the entry.
gboolean dt_dev_pixelpipe_cache_ref_entry_by_hash(const uint64_t hash, void **data, dt_pixel_cache_entry_t **entry)
Resolve and retain an existing cache entry by hash.
uint32_t dt_pixelpipe_cache_get_alloc_refusals(void)
Count the allocations the cache refused to the calling thread for lack of memory (thread-local).
#define dt_pixelpipe_cache_alloc_align_cache(size, id)
#define dt_pixelpipe_cache_free_align(mem)
void dt_dev_pixelpipe_set_input(dt_dev_pixelpipe_t *pipe, int32_t imgid, int width, int height, float iscale, dt_mipmap_size_t size)
void dt_dev_pixelpipe_disable_before(dt_dev_pixelpipe_t *pipe, const char *op)
void dt_dev_pixelpipe_disable_after(dt_dev_pixelpipe_t *pipe, const char *op)
void dt_dev_pixelpipe_set_icc(dt_dev_pixelpipe_t *pipe, dt_colorspaces_color_profile_type_t icc_type, const gchar *icc_filename, dt_iop_color_intent_t icc_intent)
void dt_dev_pixelpipe_create_nodes(dt_dev_pixelpipe_t *pipe)
int dt_dev_pixelpipe_init_thumbnail(dt_dev_pixelpipe_t *pipe, dt_develop_t *dev)
int dt_dev_pixelpipe_init_export(dt_dev_pixelpipe_t *pipe, dt_develop_t *dev, int levels, gboolean store_masks)
void dt_dev_pixelpipe_cleanup(dt_dev_pixelpipe_t *pipe)
int dt_dev_pixelpipe_process(dt_dev_pixelpipe_t *pipe, dt_iop_roi_t roi)
#define dt_dev_pixelpipe_synch_all(pipe)
static uint64_t dt_dev_backbuf_get_hash(const dt_backbuf_t *backbuf)
static gboolean dt_dev_pixelpipe_has_shutdown(const dt_dev_pixelpipe_t *pipe)
dt_iop_color_intent_t
ICC rendering intent, as stored in iop params and in conf.
dt_colorspaces_color_profile_type_t
@ DT_COLORSPACE_SRGB
sRGB – registered TWICE, and the two entries are not interchangeable.
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
struct dt_control_signal_t * dt_control_signal_get_global(void)
@ DT_SIGNAL_IMAGE_EXPORT_TMPFILE
This signal is raised after an image has been exported to a file, but before it is sent to facebook/p...
#define for_four_channels(_var,...)
void dt_cache_entry_free_detached(dt_cache_entry_t *entry)
Release an entry from dt_cache_entry_new_detached(), and its data. NULL-safe.
dt_cache_entry_t * dt_cache_entry_new_detached(void)
Allocate a cache entry that belongs to NO cache, for a one-shot decode.
GList * dt_styles_get_item_list(const char *name, gboolean params, int32_t imgid)
void dt_styles_apply_style_item(dt_develop_t *dev, dt_style_item_t *style_item)
void dt_style_item_free(gpointer data)
Region of interest passed through the pixelpipe.
dt_cache_entry_t * cache_entry
NULL with a non-NULL buf when a blocking get could not allocate the thumbnail's entry: buf is then a ...
dt_imageio_retval_t status
Why the entry holds no image: a thumbnail drawn as a skull, or a full-size input with no pixels....
#define __DT_CLONE_TARGETS__
typedef double((*spd)(unsigned long int wavelength, double TempK))
void dt_show_times(const dt_times_t *start, const char *prefix)
static void dt_get_times(dt_times_t *t)
Telling the user something happened.
int dt_exif_xmp_attach_export(const int32_t imgid, const char *filename, void *metadata)
int dt_exif_read_blob(uint8_t **buf, const char *path, const int32_t imgid, const int sRGB, const int out_width, const int out_height, const int dng_mode)
The XMP document that carries an image's development: history stack, mask shapes, module order,...