52#include <libxml/parser.h>
53#include <libxml/xpath.h>
54#include <libxml/xpathInternals.h>
70#define LRDT_CLIPPING_VERSION 5
80#define LRDT_FLIP_VERSION 2
86#define LRDT_EXPOSURE_VERSION 2
92#define LRDT_GRAIN_VERSION 1
121#define LRDT_VIGNETTE_VERSION 3
135#define LRDT_SPOTS_VERSION 1
153#define LRDT_TONECURVE_VERSION 3
154#define DT_IOP_TONECURVE_MAXNODES 20
179#define LRDT_COLORZONES_VERSION 2
180#define DT_IOP_COLORZONES_BANDS 8
195#define LRDT_SPLITTONING_VERSION 1
206#define LRDT_BILAT_VERSION 1
215#define LRDT_COLORIN_VERSION 1
216#define DT_IOP_COLOR_ICC_LEN_V1 100
224#undef DT_IOP_COLOR_ICC_LEN_V1
234#define LRDT_BLEND_VERSION 4
235#define DEVELOP_BLENDIF_SIZE 16
265 gboolean from_cache =
TRUE;
271 char *pos = strrchr(pathname,
'.');
277 strncpy(pos + 1,
"xmp", 4);
278 if(g_file_test(pathname, G_FILE_TEST_EXISTS))
279 return g_strdup(pathname);
281 strncpy(pos + 1,
"XMP", 4);
282 if(g_file_test(pathname, G_FILE_TEST_EXISTS))
283 return g_strdup(pathname);
292 while(lr2dt_table[
k + 1].lr <
value)
k++;
294 return lr2dt_table[
k].
dt
295 + ((
value - lr2dt_table[
k].
lr) / (lr2dt_table[
k + 1].lr - lr2dt_table[
k].lr))
296 * (lr2dt_table[
k + 1].dt - lr2dt_table[
k].dt);
302 = { { -100, 0.020 }, { -50, 0.005 }, { 0, 0 }, { 50, -0.005 }, { 100, -0.010 } };
309 lr2dt_t lr2dt_vignette_table[] = { { -100, -1 }, { -50, -0.7 }, { 0, 0 }, { 50, 0.5 }, { 100, 1 } };
316 lr2dt_t lr2dt_vignette_table[] = { { 0, 74 }, { 4, 75 }, { 25, 85 }, { 50, 100 }, { 100, 100 } };
323 lr2dt_t lr2dt_grain_table[] = { { 0, 0 }, { 25, 20 }, { 50, 40 }, { 100, 80 } };
330 lr2dt_t lr2dt_grain_table[] = { { 0, 100 }, { 50, 100 }, { 75, 400 }, { 100, 800 } };
337 lr2dt_t lr2dt_splittoning_table[] = { { -100, 100 }, { 0, 0 }, { 100, 0 } };
344 lr2dt_t lr2dt_clarity_table[] = { { -100, -.650 }, { 0, 0 }, { 100, .650 } };
350 size_t imported_len,
int version,
int *import_count)
359 if(imported[0]) g_strlcat(imported,
", ", imported_len);
430 const char *iter = *startptr;
431 while(*iter ==
' ') iter++;
432 if(!g_str_has_prefix(iter,
key))
435 while(*iter ==
' ') iter++;
438 while(*iter ==
' ') iter++;
439 *
value = g_ascii_strtod(iter, (
char **)startptr);
440 return iter != *startptr;
445 const char *iter = *startptr;
446 while(*iter ==
' ') iter++;
447 if(!g_str_has_prefix(iter,
key))
450 while(*iter ==
' ') iter++;
453 while(*iter ==
' ') iter++;
454 while((*iter >=
'a' && *iter <=
'z') || (*iter >=
'A' && *iter <=
'Z')) iter++;
461 return *(*startptr)++ ==
',';
468 const float hfactor = 3.0 / 9.0;
469 const float lfactor = 4.0 / 9.0;
473 if(!xmlStrcmp(
name, (
const xmlChar *)
"CropTop"))
474 data->
pc.
cy = g_ascii_strtod((
char *)
value, NULL);
475 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropRight"))
476 data->
pc.
cw = g_ascii_strtod((
char *)
value, NULL);
477 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropLeft"))
478 data->
pc.
cx = g_ascii_strtod((
char *)
value, NULL);
479 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropBottom"))
480 data->
pc.
ch = g_ascii_strtod((
char *)
value, NULL);
481 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropAngle"))
483 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ImageWidth"))
485 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ImageLength"))
487 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Orientation"))
495 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HasCrop"))
499 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Blacks2012"))
501 int v = atoi((
char *)
value);
508 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Exposure2012"))
510 float v = g_ascii_strtod((
char *)
value, NULL);
517 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteAmount"))
519 int v = atoi((
char *)
value);
526 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteMidpoint"))
528 int v = atoi((
char *)
value);
531 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteStyle"))
533 int v = atoi((
char *)
value);
539 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteFeather"))
541 int v = atoi((
char *)
value);
544 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteRoundness"))
546 int v = atoi((
char *)
value);
549 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GrainAmount"))
551 int v = atoi((
char *)
value);
558 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GrainFrequency"))
560 int v = atoi((
char *)
value);
563 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricShadows"))
567 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricDarks"))
571 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricLights"))
575 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricHighlights"))
579 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricShadowSplit"))
583 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricMidtoneSplit"))
587 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricHighlightSplit"))
591 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ToneCurveName2012"))
593 if(!xmlStrcmp(
value, (
const xmlChar *)
"Linear"))
595 else if(!xmlStrcmp(
value, (
const xmlChar *)
"Medium Contrast"))
597 else if(!xmlStrcmp(
value, (
const xmlChar *)
"Strong Contrast"))
599 else if(!xmlStrcmp(
value, (
const xmlChar *)
"Custom"))
602 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentRed"))
604 int v = atoi((
char *)
value);
608 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentOrange"))
610 int v = atoi((
char *)
value);
614 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentYellow"))
616 int v = atoi((
char *)
value);
620 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentGreen"))
622 int v = atoi((
char *)
value);
626 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentAqua"))
628 int v = atoi((
char *)
value);
632 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentBlue"))
634 int v = atoi((
char *)
value);
638 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentPurple"))
640 int v = atoi((
char *)
value);
644 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentMagenta"))
646 int v = atoi((
char *)
value);
650 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentRed"))
652 int v = atoi((
char *)
value);
656 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentOrange"))
658 int v = atoi((
char *)
value);
662 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentYellow"))
664 int v = atoi((
char *)
value);
668 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentGreen"))
670 int v = atoi((
char *)
value);
674 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentAqua"))
676 int v = atoi((
char *)
value);
680 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentBlue"))
682 int v = atoi((
char *)
value);
686 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentPurple"))
688 int v = atoi((
char *)
value);
692 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentMagenta"))
694 int v = atoi((
char *)
value);
698 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentRed"))
700 int v = atoi((
char *)
value);
704 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentOrange"))
706 int v = atoi((
char *)
value);
710 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentYellow"))
712 int v = atoi((
char *)
value);
716 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentGreen"))
718 int v = atoi((
char *)
value);
722 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentAqua"))
724 int v = atoi((
char *)
value);
728 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentBlue"))
730 int v = atoi((
char *)
value);
734 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentPurple"))
736 int v = atoi((
char *)
value);
740 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentMagenta"))
742 int v = atoi((
char *)
value);
746 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningShadowHue"))
748 int v = atoi((
char *)
value);
752 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningShadowSaturation"))
754 int v = atoi((
char *)
value);
758 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningHighlightHue"))
760 int v = atoi((
char *)
value);
764 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningHighlightSaturation"))
766 int v = atoi((
char *)
value);
770 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningBalance"))
772 float v = g_ascii_strtod((
char *)
value, NULL);
775 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Clarity2012"))
777 int v = atoi((
char *)
value);
784 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Rating"))
786 int v = atoi((
char *)
value);
793 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GPSLatitude"))
798 data->
lat = latitude;
802 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GPSLongitude"))
805 if(!isnan(longitude))
807 data->
lon = longitude;
811 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Label"))
813 char *
v = g_utf8_casefold((
char *)
value, -1);
814 if(!g_strcmp0(
v, _(
"red")))
816 else if(!g_strcmp0(
v, _(
"yellow")))
818 else if(!g_strcmp0(
v, _(
"green")))
820 else if(!g_strcmp0(
v, _(
"blue")))
833 || !xmlStrcmp(
name, (
const xmlChar *)
"hierarchicalSubject")))
835 xmlNodePtr tagNode = node;
837 gboolean tag_change =
FALSE;
840 if(!xmlStrcmp(tagNode->name, (
const xmlChar *)
"li"))
842 xmlChar *cvalue = xmlNodeListGetString(doc, tagNode->xmlChildrenNode, 1);
850 tagNode = tagNode->next;
854 else if(!
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"RetouchInfo"))
856 xmlNodePtr riNode = node;
860 if(!xmlStrcmp(riNode->name, (
const xmlChar *)
"li"))
862 xmlChar *cvalue = xmlNodeListGetString(doc, riNode->xmlChildrenNode, 1);
864 float x, y, radius, xc, yc;
865 const char *startptr = (
const char *)cvalue;
889 riNode = riNode->next;
892 else if(!
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"ToneCurvePV2012"))
894 xmlNodePtr tcNode = node;
898 if(!xmlStrcmp(tcNode->name, (
const xmlChar *)
"li"))
900 xmlChar *cvalue = xmlNodeListGetString(doc, tcNode->xmlChildrenNode, 1);
902 if(sscanf((
const char *)cvalue,
"%d, %d",
907 tcNode = tcNode->next;
910 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"title"))
912 xmlNodePtr ttlNode = node;
915 if(!xmlStrncmp(ttlNode->name, (
const xmlChar *)
"li", 2))
917 xmlChar *cvalue = xmlNodeListGetString(doc, ttlNode->xmlChildrenNode, 1);
921 ttlNode = ttlNode->next;
924 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"description"))
926 xmlNodePtr desNode = node;
929 if(!xmlStrncmp(desNode->name, (
const xmlChar *)
"li", 2))
931 xmlChar *cvalue = xmlNodeListGetString(doc, desNode->xmlChildrenNode, 1);
935 desNode = desNode->next;
938 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"creator"))
940 xmlNodePtr creNode = node;
943 if(!xmlStrncmp(creNode->name, (
const xmlChar *)
"li", 2))
945 xmlChar *cvalue = xmlNodeListGetString(doc, creNode->xmlChildrenNode, 1);
949 creNode = creNode->next;
952 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"rights"))
954 xmlNodePtr rigNode = node;
957 if(!xmlStrncmp(rigNode->name, (
const xmlChar *)
"li", 2))
959 xmlChar *cvalue = xmlNodeListGetString(doc, rigNode->xmlChildrenNode, 1);
963 rigNode = rigNode->next;
971 return !strcmp(
name,
"subject")
972 || !strcmp(
name,
"hierarchicalSubject")
973 || !strcmp(
name,
"RetouchInfo")
974 || !strcmp(
name,
"ToneCurvePV2012")
975 || !strcmp(
name,
"title")
976 || !strcmp(
name,
"description")
977 || !strcmp(
name,
"creator")
978 || !strcmp(
name,
"publisher")
979 || !strcmp(
name,
"rights");
985 xmlXPathObject *xpathObj = xmlXPathEvalExpression(xpath, ctx);
989 const xmlNodeSetPtr xnodes = xpathObj->nodesetval;
990 const int n = xnodes->nodeNr;
992 for (
int k=0;
k<
n;
k++)
994 const xmlNode *node = xnodes->nodeTab[
k];
998 xmlNodePtr listnode = node->xmlChildrenNode;
999 if (listnode) listnode = listnode->next;
1000 if (listnode) listnode = listnode->xmlChildrenNode;
1001 if (listnode) listnode = listnode->next;
1002 if (listnode)
_lrop(dev, doc, imgid, node->name, NULL, listnode, data);
1006 const xmlChar *
value = xmlNodeListGetString(doc, node->children, 1);
1007 _lrop(dev, doc, imgid, node->name,
value, NULL, data);
1011 xmlXPathFreeObject(xpathObj);
1015static inline void flip(
float *
x,
float *y)
1017 const float tmp = *
x;
1022static inline void swap(
float *
x,
float *y)
1024 const float tmp = *
x;
1029static inline double rotate_x(
double x,
double y,
const double rangle)
1031 return x*cos(rangle) + y*sin(rangle);
1034static inline double rotate_y(
double x,
double y,
const double rangle)
1036 return -
x*sin(rangle) + y*cos(rangle);
1039static inline void rotate_xy(
double *cx,
double *cy,
const double rangle)
1041 const double x = *cx;
1042 const double y = *cy;
1049 return round(
x * 100000.f) / 100000.f;
1054 gboolean refresh_needed =
FALSE;
1055 char imported[256] = { 0 };
1070 xmlNodePtr entryNode;
1074 doc = xmlReadFile(pathname, NULL, 0);
1084 entryNode = xmlDocGetRootElement(doc);
1093 if(xmlStrcmp(entryNode->name, (
const xmlChar *)
"xmpmeta"))
1095 if(!iauto)
dt_control_log(_(
"`%s' not a lightroom XMP!"), pathname);
1102 xmlXPathContextPtr xpathCtx = xmlXPathNewContext(doc);
1111 xmlXPathRegisterNs(xpathCtx, BAD_CAST
"stEvt", BAD_CAST
"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#");
1113 xmlXPathObjectPtr xpathObj = xmlXPathEvalExpression((
const xmlChar *)
"//@stEvt:softwareAgent", xpathCtx);
1117 if(!iauto)
dt_control_log(_(
"`%s' not a lightroom XMP!"), pathname);
1118 xmlXPathFreeContext(xpathCtx);
1124 xmlNodeSetPtr xnodes = xpathObj->nodesetval;
1128 xmlNodePtr xnode = xnodes->nodeTab[0];
1129 xmlChar *
value = xmlNodeListGetString(doc, xnode->xmlChildrenNode, 1);
1131 if(!strstr((
char *)
value,
"Lightroom") && !strstr((
char *)
value,
"Camera Raw"))
1133 xmlXPathFreeContext(xpathCtx);
1134 xmlXPathFreeObject(xpathObj);
1137 if(!iauto)
dt_control_log(_(
"`%s' not a lightroom XMP!"), pathname);
1158 memset(&data, 0,
sizeof(data));
1189 BAD_CAST
"http://ns.adobe.com/camera-raw-settings/1.0/");
1193 BAD_CAST
"http://purl.org/dc/elements/1.1/");
1197 BAD_CAST
"http://ns.adobe.com/tiff/1.0/");
1201 BAD_CAST
"http://ns.adobe.com/xap/1.0/");
1205 BAD_CAST
"http://ns.adobe.com/exif/1.0/");
1209 BAD_CAST
"http://ns.adobe.com/lightroom/1.0/");
1213 BAD_CAST
"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
1216 static char *names[] = {
"crs",
"dc",
"tiff",
"xmp",
"exif",
"lr", NULL };
1218 for (
int i=0; names[
i]!=NULL;
i++)
1223 snprintf(expr,
sizeof(expr),
"//%s:*", names[
i]);
1224 _handle_xpath(dev, doc, imgid, xpathCtx, (
const xmlChar *)expr, &data);
1227 snprintf(expr,
sizeof(expr),
"//@%s:*", names[
i]);
1228 _handle_xpath(dev, doc, imgid, xpathCtx, (
const xmlChar *)expr, &data);
1231 xmlXPathFreeObject(xpathObj);
1232 xmlXPathFreeContext(xpathCtx);
1244 refresh_needed =
TRUE;
1250 double cx, cw, cy,
ch;
1251 double new_width, new_height;
1283 data.
pc.
cx =
round5((cx / new_width) + 0.5f);
1284 data.
pc.
cw =
round5((cw / new_width) + 0.5f);
1285 data.
pc.
cy =
round5((cy / new_height) + 0.5f);
1310 refresh_needed =
TRUE;
1319 refresh_needed =
TRUE;
1326 refresh_needed =
TRUE;
1335 refresh_needed =
TRUE;
1340 const float base_ratio = 1.325 / 1.5;
1363 float dscale = (1 - (newratio / data.
pv.
whratio)) / 2.0;
1365 data.
pv.
scale -= dscale * 100.0;
1371 refresh_needed =
TRUE;
1390 refresh_needed =
TRUE;
1407 float linear_ab[7] = { 0.0, 0.08, 0.3, 0.5, 0.7, 0.92, 1.0 };
1434 for(
int k = 0;
k < total_pts;
k++)
1458 refresh_needed =
TRUE;
1465 for(
int i = 0;
i < 3;
i++)
1466 for(
int k = 0;
k < 8;
k++)
1471 refresh_needed =
TRUE;
1480 refresh_needed =
TRUE;
1490 refresh_needed =
TRUE;
1495 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1496 g_strlcat(imported, _(
"tags"),
sizeof(imported));
1504 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1505 g_strlcat(imported, _(
"rating"),
sizeof(imported));
1517 imgs = g_list_prepend(imgs, GINT_TO_POINTER(imgid));
1520 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1521 g_strlcat(imported, _(
"geotagging"),
sizeof(imported));
1529 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1530 g_strlcat(imported, _(
"color label"),
sizeof(imported));
1536 dt_control_log(ngettext(
"%s has been imported",
"%s have been imported", n_import), imported);
size_t params_size(dt_imageio_module_format_t *self)
static const dt_aligned_pixel_simd_t const dt_adaptation_t const float p
void dt_colorlabels_set_label(const int32_t imgid, const int color)
#define DT_IOP_COLORZONES_BANDS
gboolean dt_history_set_end(const int32_t imgid, const int32_t history_end)
gboolean dt_history_db_write_history_item(const int32_t imgid, const int num, const char *operation, const void *op_params, const int op_params_size, const int module_version, const gboolean enabled, const void *blendop_params, const int blendop_params_size, const int blendop_version, const int multi_priority, const char *multi_name)
int32_t dt_history_db_get_next_history_num(const int32_t imgid)
gboolean dt_image_is_raw(const dt_image_t *img)
void dt_image_set_location(const int32_t imgid, const dt_image_geoloc_t *geoloc, const gboolean undo_on, const gboolean group_on)
void dt_image_synch_xmp(const int selected)
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_log(const char *msg,...)
static const dt_aligned_pixel_simd_t value
#define DT_MAX_FILENAME_LEN
#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_write_history(dt_develop_t *dev, gboolean async)
Thread-safe wrapper around dt_dev_write_history_ext() for dev->image_storage.id.
void dt_dev_history_pixelpipe_update(dt_develop_t *dev, gboolean rebuild)
Rebuild or resync pixelpipes after backend history changes.
void dt_dev_history_gui_update(dt_develop_t *dev)
Apply history-loaded params to module GUIs.
void dt_dev_history_notify_change(dt_develop_t *dev, const int32_t imgid)
Notify the rest of the app that history changes were written.
gboolean dt_dev_reload_history_items(dt_develop_t *dev, const int32_t imgid)
Reload history from DB and rebuild pipelines/GUI state.
static dt_image_orientation_t dt_image_orientation_to_flip_bits(const int orient)
@ ORIENTATION_ROTATE_CCW_90_DEG
@ ORIENTATION_ROTATE_CW_90_DEG
@ ORIENTATION_FLIP_VERTICALLY
@ ORIENTATION_FLIP_HORIZONTALLY
dt_exif_image_orientation_t
@ EXIF_ORIENTATION_ROTATE_CW_90_DEG
@ EXIF_ORIENTATION_ROTATE_CCW_90_DEG
const gchar * dt_iop_get_localized_name(const gchar *op)
static gboolean _skip_key_value_pair(const char **startptr, const char *key)
struct dt_iop_tonecurve_params_t dt_iop_tonecurve_params_t
static void _handle_xpath(dt_develop_t *dev, xmlDoc *doc, int32_t imgid, xmlXPathContext *ctx, const xmlChar *xpath, lr_data_t *data)
static gboolean _skip_comma(const char **startptr)
static void rotate_xy(double *cx, double *cy, const double rangle)
static gboolean _read_float(const char **startptr, const char *key, float *value)
@ DT_GRAIN_CHANNEL_SATURATION
@ DT_GRAIN_CHANNEL_LIGHTNESS
#define LRDT_BLEND_VERSION
#define LRDT_SPOTS_VERSION
struct dt_iop_exposure_params_t dt_iop_exposure_params_t
#define LRDT_VIGNETTE_VERSION
struct dt_iop_vignette_params_t dt_iop_vignette_params_t
struct dt_iop_splittoning_params_t dt_iop_splittoning_params_t
static float lr2dt_vignette_gain(float value)
struct dt_iop_bilat_params_t dt_iop_bilat_params_t
static float get_interpolate(lr2dt_t lr2dt_table[], float value)
static void swap(float *x, float *y)
static void _lrop(const dt_develop_t *dev, const xmlDocPtr doc, const int32_t imgid, const xmlChar *name, const xmlChar *value, const xmlNodePtr node, lr_data_t *data)
#define DT_IOP_COLOR_ICC_LEN_V1
static double rotate_y(double x, double y, const double rangle)
static float lr2dt_splittoning_balance(float value)
struct dt_iop_colorzones_params_t dt_iop_colorzones_params_t
static float lr2dt_clarity(float value)
static float lr2dt_grain_frequency(float value)
#define LRDT_FLIP_VERSION
#define LRDT_CLIPPING_VERSION
static float round5(double x)
gboolean dt_lightroom_import(int32_t imgid, dt_develop_t *dev, gboolean iauto)
dt_iop_colorzones_channel_t
#define DT_IOP_COLORZONES_BANDS
#define LRDT_EXPOSURE_VERSION
static void dt_add_hist(int32_t imgid, char *operation, dt_iop_params_t *params, int params_size, char *imported, size_t imported_len, int version, int *import_count)
#define LRDT_COLORIN_VERSION
#define LRDT_TONECURVE_VERSION
struct dt_iop_spots_params_t dt_iop_spots_params_t
struct dt_iop_grain_params_t dt_iop_grain_params_t
#define LRDT_GRAIN_VERSION
static float lr2dt_grain_amount(float value)
struct dt_iop_tonecurve_node_t dt_iop_tonecurve_node_t
#define LRDT_COLORZONES_VERSION
struct dt_iop_fvector_2d_t dt_iop_vector_2d_t
static int _has_list(char *name)
static float lr2dt_vignette_midpoint(float value)
#define LRDT_SPLITTONING_VERSION
#define LRDT_BILAT_VERSION
#define DEVELOP_BLENDIF_SIZE
struct dt_iop_flip_params_t dt_iop_flip_params_t
static double rotate_x(double x, double y, const double rangle)
struct dt_iop_clipping_params_t dt_iop_clipping_params_t
static float lr2dt_blacks(float value)
char * dt_get_lightroom_xmp(int32_t imgid)
float *const restrict const size_t k
float *const restrict const size_t const size_t ch
void dt_ratings_apply_on_image(const int32_t imgid, const int rating, const gboolean single_star_toggle, const gboolean undo_on, const gboolean group_on)
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
@ DT_SIGNAL_DEVELOP_HISTORY_CHANGE
This signal is raised when develop history is changed no param, no returned value.
@ DT_SIGNAL_GEOTAG_CHANGED
This signal is raised when a geotag is added/deleted/changed
@ DT_SIGNAL_TAG_CHANGED
This signal is raised when a tag is added/deleted/changed
const float const int flip
struct dt_control_signal_t * signals
float blendif_parameters[4 *DEVELOP_BLENDIF_SIZE]
dt_image_orientation_t orientation
dt_iop_color_intent_t intent
dt_image_orientation_t orientation
_dt_iop_grain_channel_t channel
float highlight_saturation
dt_iop_tonecurve_node_t tonecurve[3][20]
int tonecurve_autoscale_ab
dt_iop_vector_2d_t center
dt_iop_tonecurve_params_t ptc
dt_iop_colorzones_params_t pcz
dt_iop_splittoning_params_t pst
dt_iop_clipping_params_t pc
lr_curve_kind_t curve_kind
dt_iop_bilat_params_t pbl
dt_iop_exposure_params_t pe
dt_exif_image_orientation_t orientation
dt_iop_vignette_params_t pv
double dt_util_gps_string_to_number(const gchar *input)