104#if defined(HAVE_GRAPHICSMAGICK)
105#include <magick/api.h>
106#include <magick/blob.h>
107#elif defined(HAVE_IMAGEMAGICK)
108#include <MagickWand/MagickWand.h>
112#include <glib/gstdio.h>
131 = {
"3fr",
"ari",
"arw",
"bay",
"cr2",
"cr3",
"crw",
"dc2",
"dcr",
"erf",
"fff",
132 "ia",
"iiq",
"k25",
"kc2",
"kdc",
"mdc",
"mef",
"mos",
"mrw",
"nef",
"nrw",
133 "orf",
"pef",
"raf",
"raw",
"rw2",
"rwl",
"sr2",
"srf",
"srw",
"sti",
"x3f", NULL };
136 = {
"bmp",
"bmq",
"cap",
"cine",
"cs1",
"dcm",
"gif",
"gpr",
"j2c",
"j2k",
"jng",
"jp2",
"jpc",
137 "jpeg",
"jpg",
"miff",
"mng",
"ori",
"pbm",
"pgm",
"png",
"pnm",
"ppm",
"pxn",
"qtk",
"rdc",
157#if defined(HAVE_GRAPHICSMAGICK)
158static const char *_preview_format_from_mime_type(
const char *mime_type)
160 if(
IS_NULL_PTR(mime_type) || mime_type[0] ==
'\0')
return NULL;
162 if(!strcmp(mime_type,
"image/jpeg"))
return "JPEG";
163 if(!strcmp(mime_type,
"image/png"))
return "PNG";
164 if(!strcmp(mime_type,
"image/tiff"))
return "TIFF";
165 if(!strcmp(mime_type,
"image/x-tiff"))
return "TIFF";
166 if(!strcmp(mime_type,
"image/gif"))
return "GIF";
167 if(!strcmp(mime_type,
"image/bmp"))
return "BMP";
168 if(!strcmp(mime_type,
"image/x-portable-pixmap"))
return "PPM";
169 if(!strcmp(mime_type,
"image/x-portable-graymap"))
return "PGM";
170 if(!strcmp(mime_type,
"image/x-portable-bitmap"))
return "PBM";
171 if(!strcmp(mime_type,
"image/x-portable-anymap"))
return "PNM";
172 if(!strcmp(mime_type,
"image/webp"))
return "WEBP";
186 if(!g_ascii_strncasecmp(ext, *
i, strlen(*
i)))
193 if(!g_ascii_strncasecmp(ext, *
i, strlen(*
i)))
200 if(!g_ascii_strncasecmp(ext, *
i, strlen(*
i)))
215 char *mime_type = NULL;
221 if(strcmp(mime_type,
"image/jpeg") == 0)
229 if(!*buffer)
goto error;
231 *th_width = jpg.
width;
246#if defined(HAVE_GRAPHICSMAGICK)
247 const char *
const preview_format = _preview_format_from_mime_type(mime_type);
248 ExceptionInfo exception;
250 ImageInfo *image_info = NULL;
252 GetExceptionInfo(&exception);
253 image_info = CloneImageInfo((ImageInfo *)NULL);
255 g_strlcpy(image_info->magick, preview_format,
sizeof(image_info->magick));
263 DT_MAGICK_ABORT_GUARD(
"dt_imageio_large_thumbnail GM", filename, {
272 image = BlobToImage(image_info, buf, bufsize, &exception);
274 if(exception.severity != UndefinedException) CatchException(&exception);
278 fprintf(stderr,
"[dt_imageio_large_thumbnail GM] thumbnail not found?\n");
282 *th_width = image->columns;
283 *th_height = image->rows;
287 sizeof(uint8_t) * 4 * image->columns * image->rows,
289 if(!*buffer)
goto error_gm;
291 for(uint32_t
row = 0;
row < image->rows;
row++)
293 uint8_t *bufprt = *buffer + (size_t)4 *
row * image->columns;
294 int gm_ret = DispatchImage(image, 0,
row, image->columns, 1,
"RGBP", CharPixel, bufprt, &exception);
296 if(exception.severity != UndefinedException) CatchException(&exception);
298 if(gm_ret != MagickPass)
300 fprintf(stderr,
"[dt_imageio_large_thumbnail GM] error_gm reading thumbnail\n");
311 DT_MAGICK_ABORT_GUARD_DISARM();
312 if(image) DestroyImage(image);
313 if(image_info) DestroyImageInfo(image_info);
314 DestroyExceptionInfo(&exception);
316#elif defined(HAVE_IMAGEMAGICK)
317 MagickWand *image = NULL;
318 MagickBooleanType mret;
320 image = NewMagickWand();
328 DT_MAGICK_ABORT_GUARD(
"dt_imageio_large_thumbnail IM", filename, {
337 mret = MagickReadImageBlob(image, buf, bufsize);
338 if(mret != MagickTrue)
340 fprintf(stderr,
"[dt_imageio_large_thumbnail IM] thumbnail not found?\n");
344 *th_width = MagickGetImageWidth(image);
345 *th_height = MagickGetImageHeight(image);
346 switch (MagickGetImageColorspace(image)) {
352 "[dt_imageio_large_thumbnail IM] could not map colorspace, using sRGB");
357 *buffer = malloc(
sizeof(uint8_t) * (*th_width) * (*th_height) * 4);
360 mret = MagickExportImagePixels(image, 0, 0, *th_width, *th_height,
"RGBP", CharPixel, *buffer);
361 if(mret != MagickTrue) {
364 "[dt_imageio_large_thumbnail IM] error while reading thumbnail\n");
371 DT_MAGICK_ABORT_GUARD_DISARM();
372 DestroyMagickWand(image);
373 if(res != 0)
goto error;
376 "[dt_imageio_large_thumbnail] error: The thumbnail image is not in "
377 "JPEG format, and DT was built without neither GraphicsMagick or "
378 "ImageMagick. Please rebuild DT with GraphicsMagick or ImageMagick "
379 "support enabled.\n");
387 "[dt_imageio_large_thumbnail] error: Not a supported thumbnail image format or broken thumbnail: %s\n",
402 int32_t thumb_width = 0, thumb_height = 0;
403 gboolean mono =
FALSE;
407 if((thumb_width < 32) || (thumb_height < 32) || (
IS_NULL_PTR(tmp)))
411 for(
int y = 0; y < thumb_height; y++)
413 uint8_t *in = (uint8_t *)tmp + (
size_t)4 * y * thumb_width;
414 for(
int x = 0;
x < thumb_width;
x++, in += 4)
416 if((in[0] != in[1]) || (in[0] != in[2]) || (in[1] != in[2]))
426 dt_print(
DT_DEBUG_IMAGEIO,
"[dt_imageio_has_mono_preview] testing `%s', yes/no %i, %ix%i\n", filename, mono, thumb_width, thumb_height);
433 const int fwd,
const int fht,
const int stride,
439 for(
int j = 0; j < ht; j++) memcpy(
out + (
size_t)j *
bpp * wd, in + (
size_t)j * stride,
bpp * wd);
443 int si =
bpp, sj = wd *
bpp;
451 jj = (int)fht - jj - 1;
456 ii = (int)fwd - ii - 1;
460 for(
int j = 0; j < ht; j++)
462 char *out2 =
out + (size_t)labs(sj) * jj + (size_t)labs(si) * ii + (size_t)sj * j;
463 const char *in2 = in + (size_t)stride * j;
464 for(
int i = 0;
i < wd;
i++)
466 memcpy(out2, in2,
bpp);
474 const int ch,
const int wd,
const int ht,
const int fwd,
475 const int fht,
const int stride,
478 const float scale = 1.0f / (white - black);
482 for(
int j = 0; j < ht; j++)
483 for(
int i = 0;
i < wd;
i++)
484 for(
int k = 0;
k <
ch;
k++)
485 out[4 * ((
size_t)j * wd +
i) +
k] = (in[(size_t)j * stride + (
size_t)
ch *
i +
k] - black) * scale;
489 int si = 4, sj = wd * 4;
497 jj = (int)fht - jj - 1;
502 ii = (int)fwd - ii - 1;
506 for(
int j = 0; j < ht; j++)
508 float *out2 =
out + (size_t)labs(sj) * jj + (size_t)labs(si) * ii + sj * j;
509 const uint8_t *in2 = in + (size_t)stride * j;
510 for(
int i = 0;
i < wd;
i++)
512 for(
int k = 0;
k <
ch;
k++) out2[
k] = (in2[
k] - black) * scale;
561 ".jpg",
".jpeg",
".png",
".tiff",
".tif",
".pgm",
".pbm",
".ppm",
576 const char *c = filename + strlen(filename);
577 while(c > filename && *c !=
'.') c--;
578 if(*c !=
'.')
return FALSE;
592 ".3fr",
".ari",
".arw",
".bay",
".bmq",
".cap",
".cine",
".cr2",
".crw",
".cs1",
".dc2",
593 ".dcr",
".dng",
".gpr",
".erf",
".fff",
".ia",
".iiq",
".k25",
".kc2",
".kdc",
".mdc",
594 ".mef",
".mos",
".mrw",
".nef",
".nrw",
".orf",
".ori",
".pef",
".pxn",
".qtk",
".raf",
595 ".raw",
".rdc",
".rw2",
".rwl",
".sr2",
".srf",
".srw",
".x3f",
607 const char *c = filename + strlen(filename);
608 while(c > filename && *c !=
'.') c--;
609 if(*c !=
'.')
return FALSE;
633 ".heif",
".heic",
".hif",
642 const char *c = filename + strlen(filename);
643 while(c > filename && *c !=
'.') c--;
644 if(*c !=
'.')
return FALSE;
659 gboolean success =
FALSE;
664 success = !g_ascii_strncasecmp(list, elem, strlen(elem));
665 list = strtok(NULL,
",");
675 gboolean is_handled =
FALSE;
677 char *ext = g_strrstr(filename,
".") + 1;
682 is_handled |=
_is_in_list(ext, strtok(extensions,
","));
690 const char *iolib = (is_handled) ?
"Libraw" :
"Rawspeed";
791 *num = (int)(in * *den + .5f);
792 while(fabsf(*num / (
float)*den - in) > 0.001f)
795 *num = (int)(in * *den + .5f);
801 const gboolean copy_metadata,
const gboolean export_masks,
806 if(strcmp(format->mime(format_params),
"x-copy") == 0)
808 return format->write_image(format_params, filename, NULL, icc_type, icc_filename, NULL, 0, imgid, num, total, NULL,
812 const gboolean is_scaling =
816 FALSE, NULL, copy_metadata, export_masks, icc_type, icc_filename, icc_intent,
817 storage, storage_params, num, total, metadata, NULL);
826 dt_control_log(_(
"cannot find the style '%s' to apply during export."), format_params->
style);
834 for(GList *st_items = style_items; st_items; st_items = g_list_next(st_items))
850 fprintf(stderr,
"[dt_imageio_export_with_flags] ");
853 fprintf(stderr,
"appending style `%s'\n", format_params->
style);
855 else fprintf(stderr,
"\n");
857 for(GList *nodes = pipe->
nodes; nodes; nodes = g_list_next(nodes))
863 fprintf(stderr,
" %s", piece->module->op);
866 fprintf(stderr,
" (%i)\n", cnt);
884 int width,
int height,
int *processed_width,
int *processed_height)
892 const double scale_factor = _num / _denum;
893 *scale = fmin(scale_factor, 1.);
916 *scale = fmin(scale_x, scale_y);
919 if(image_ratio > 1.0)
923 *processed_height =
MIN((
int)roundf(*processed_width / image_ratio), pipe->
processed_height);
925 else if(image_ratio < 1.0)
929 *processed_width =
MIN((
int)roundf(*processed_height * image_ratio), pipe->
processed_width);
944 *processed_height = (int)roundf(*processed_width / image_ratio);
950 *processed_width = (int)roundf(*processed_height * image_ratio);
955 *scale = fmin(scale_x, scale_y);
962 const size_t processed_height)
965 for(
size_t k = 0;
k < processed_width * processed_height;
k++)
967 outbuf[4 *
k + c] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + c] * 255.f), 0.f, 255.f);
972 const size_t processed_width,
const size_t processed_height)
975 for(
size_t k = 0;
k < processed_width * processed_height;
k++)
977 outbuf[4 *
k + 0] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 2] * 255.f), 0.f, 255.f);
978 outbuf[4 *
k + 1] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 1] * 255.f), 0.f, 255.f);
979 outbuf[4 *
k + 2] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 0] * 255.f), 0.f, 255.f);
980 outbuf[4 *
k + 3] = (uint8_t)
CLAMPF(roundf(inbuf[4 *
k + 3] * 255.f), 0.f, 255.f);
986 const size_t processed_width,
const size_t processed_height)
989 for(
size_t k = 0;
k < processed_width * processed_height;
k++)
991 outbuf[4 *
k + c] = (uint16_t)CLAMP(roundf(inbuf[4 *
k + c] * 65535.f), 0.f, 65535.f);
997 const gboolean ignore_exif,
const gboolean display_byteorder,
998 const gboolean high_quality, gboolean is_scaling,
const gboolean thumbnail_export,
999 const char *filter,
const gboolean copy_metadata,
const gboolean export_masks,
1010 void *outbuf = NULL;
1019 const gboolean use_style = !thumbnail_export && format_params->
style[0] !=
'\0';
1031 if(thumbnail_export)
1036 if(!res)
goto error;
1059 const size_t buf_width = buf.
width;
1060 const size_t buf_height = buf.
height;
1090 int processed_width = 0;
1091 int processed_height = 0;
1093 &processed_width, &processed_height);
1096 "[dt_imageio_export] (direct) image input %ix%i, turned to output %ix%i, will be exported to fit %ix%i "
1097 "--> final size is %ix%i\n",
1102 const int bpp = format->bpp(format_params);
1108 dt_show_times(&start, thumbnail_export ?
"[dev_process_thumbnail] pixel pipeline processing thread"
1109 :
"[dev_process_export] pixel pipeline processing thread");
1128 &
data, &cache_entry)
1145 sizeof(uint8_t) * pixels,
1147 if(outbuf && display_byteorder)
1157 if(outbuf && thumbnail_export)
1159 uint8_t *thumbnail_buf = (uint8_t *)outbuf;
1161 for(
size_t k = 0;
k < pixels / 4;
k++) thumbnail_buf[4 *
k + 3] = UINT8_MAX;
1167 sizeof(uint16_t) * pixels,
1172 if(outbuf && thumbnail_export)
1174 uint16_t *thumbnail_buf = (uint16_t *)outbuf;
1176 for(
size_t k = 0;
k < pixels / 4;
k++) thumbnail_buf[4 *
k + 3] = UINT16_MAX;
1182 sizeof(float_t) * pixels,
1185 memcpy(outbuf,
data,
sizeof(float_t) * pixels);
1187 if(outbuf && thumbnail_export)
1189 float *thumbnail_buf = (
float *)outbuf;
1191 for(
size_t k = 0;
k < pixels / 4;
k++) thumbnail_buf[4 *
k + 3] = 1.0f;
1208 uint8_t *exif_profile = NULL;
1212 gboolean from_cache =
TRUE;
1222 res = format->write_image(format_params, filename, outbuf, icc_type, icc_filename, exif_profile, length, imgid,
1223 num, total, &pipe, export_masks);
1235 if(!thumbnail_export && strcmp(format->mime(format_params),
"memory")
1239 format_params, storage, storage_params);
1264#if defined(HAVE_GRAPHICSMAGICK)
1266#elif defined(HAVE_IMAGEMAGICK)
1280 const char *filename,
1284 if(!g_file_test(filename, G_FILE_TEST_IS_REGULAR))
1298 fprintf(stderr,
"[imageio] The file %s is corrupted. Abort.\n", filename);
1309 fprintf(stderr,
"[imageio] The file %s is corrupted. Abort.\n", filename);
1320 fprintf(stderr,
"[imageio] The file %s is corrupted. Abort.\n", filename);
1340 fprintf(stderr,
"[imageio] The file %s is supported by none of our decoders.\n", filename);
1341 dt_control_log(_(
"The file `%s` is supported by none of our decoders."), filename);
1357 char *mk,
int mk_len,
char *md,
int md_len,
1358 char *al,
int al_len)
static void error(char *msg)
const char * extension(dt_imageio_module_data_t *data)
void cleanup(dt_imageio_module_format_t *self)
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)
dt_colorspaces_color_profile_type_t
static dt_aligned_pixel_t sRGB
const dt_colormatrix_t dt_aligned_pixel_t out
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.
gchar * dt_conf_get_string(const char *name)
gboolean dt_conf_is_equal(const char *name, const char *value)
void dt_control_log(const char *msg,...)
void dt_show_times(const dt_times_t *start, const char *prefix)
void dt_print(dt_debug_thread_t thread, const char *msg,...)
#define dt_pixelpipe_cache_alloc_align_cache(size, id)
static void dt_get_times(dt_times_t *t)
#define dt_pixelpipe_cache_free_align(mem)
#define __DT_CLONE_TARGETS__
#define for_four_channels(_var,...)
#define __OMP_PARALLEL_FOR__(...)
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
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_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)
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)
int dt_exif_xmp_attach_export(const int32_t imgid, const char *filename, void *metadata)
int dt_exif_get_thumbnail(const char *path, uint8_t **buffer, size_t *size, char **mime_type, int *width, int *height, int min_width)
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)
@ DT_IMAGEIO_FILE_CORRUPTED
int 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, gboolean is_scaling, const gboolean thumbnail_export, 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)
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)
static const gchar * _supported_raw[]
static const char * raster_formats[]
static const char * raw_formats[]
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)
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 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 _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 const gchar * _supported_ldr[]
static const char * hdr_formats[]
gboolean dt_imageio_is_raster(const char *filename)
gboolean dt_imageio_has_mono_preview(const char *filename)
void dt_imageio_to_fractional(float in, uint32_t *num, uint32_t *den)
gboolean dt_imageio_is_handled_by_libraw(dt_image_t *img, const char *filename)
gboolean _get_export_size(dt_develop_t *dev, dt_dev_pixelpipe_t *pipe, const dt_imageio_module_data_t *format_params, const gboolean is_scaling, double *scale, int width, int height, int *processed_width, int *processed_height)
gboolean _apply_style_before_export(dt_develop_t *dev, dt_imageio_module_data_t *format_params, const int32_t imgid)
dt_imageio_retval_t dt_imageio_open_hdr(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
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(char *elem, char *list)
gboolean dt_imageio_is_raw(const char *filename)
dt_imageio_retval_t dt_imageio_open_exotic(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
dt_image_flags_t dt_imageio_get_type_from_extension(const char *extension)
Map Exiv2 preview MIME types to decoder format identifiers.
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,...
static const gchar * _supported_hdr[]
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_avif(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf)
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_gm(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
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_im(dt_image_t *img, const char *filename, dt_mipmap_buffer_t *buf)
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)
gchar * dt_imageio_resizing_factor_get_and_parsing(double *num, double *denum)
@ 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)
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)
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.
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
#define CLAMPF(a, mn, mx)
dt_colorspaces_color_profile_type_t color_space
#define dt_mipmap_cache_get(A, B, C, D, E, F)
#define dt_mipmap_cache_release(A, B)
void dt_dev_pixelpipe_cache_ref_count_entry(dt_dev_pixelpipe_cache_t *cache, gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Increase/Decrease the reference count on the cache line as to prevent LRU item removal....
gboolean dt_dev_pixelpipe_cache_ref_entry_by_hash(dt_dev_pixelpipe_cache_t *cache, const uint64_t hash, void **data, dt_pixel_cache_entry_t **entry)
Resolve and retain an existing cache entry by hash.
void dt_dev_pixelpipe_cache_rdlock_entry(dt_dev_pixelpipe_cache_t *cache, gboolean lock, dt_pixel_cache_entry_t *cache_entry)
Lock or release the read lock on the entry.
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)
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
@ 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...
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)
struct dt_dev_pixelpipe_cache_t * pixelpipe_cache
struct dt_mipmap_cache_t * mipmap_cache
struct dt_control_signal_t * signals
struct dt_iop_module_t *void * data
dt_atomic_int * shutdown_ext
Region of interest passed through the pixelpipe.
dt_dev_pixelpipe_cache_t * cache
typedef double((*spd)(unsigned long int wavelength, double TempK))