54#include <libxml/parser.h>
55#include <libxml/xpath.h>
56#include <libxml/xpathInternals.h>
71#define LRDT_CLIPPING_VERSION 5
81#define LRDT_FLIP_VERSION 2
87#define LRDT_EXPOSURE_VERSION 2
93#define LRDT_GRAIN_VERSION 1
122#define LRDT_VIGNETTE_VERSION 3
136#define LRDT_SPOTS_VERSION 1
154#define LRDT_TONECURVE_VERSION 3
155#define DT_IOP_TONECURVE_MAXNODES 20
180#define LRDT_COLORZONES_VERSION 2
181#define DT_IOP_COLORZONES_BANDS 8
196#define LRDT_SPLITTONING_VERSION 1
207#define LRDT_BILAT_VERSION 1
216#define LRDT_COLORIN_VERSION 1
217#define DT_IOP_COLOR_ICC_LEN_V1 100
225#undef DT_IOP_COLOR_ICC_LEN_V1
235#define LRDT_BLEND_VERSION 4
236#define DEVELOP_BLENDIF_SIZE 16
266 gboolean from_cache =
TRUE;
272 char *pos = strrchr(pathname,
'.');
278 strncpy(pos + 1,
"xmp", 4);
279 if(g_file_test(pathname, G_FILE_TEST_EXISTS))
280 return g_strdup(pathname);
282 strncpy(pos + 1,
"XMP", 4);
283 if(g_file_test(pathname, G_FILE_TEST_EXISTS))
284 return g_strdup(pathname);
293 while(lr2dt_table[
k + 1].lr <
value)
k++;
295 return lr2dt_table[
k].
dt
296 + ((
value - lr2dt_table[
k].
lr) / (lr2dt_table[
k + 1].lr - lr2dt_table[
k].lr))
297 * (lr2dt_table[
k + 1].dt - lr2dt_table[
k].dt);
303 = { { -100, 0.020 }, { -50, 0.005 }, { 0, 0 }, { 50, -0.005 }, { 100, -0.010 } };
310 lr2dt_t lr2dt_vignette_table[] = { { -100, -1 }, { -50, -0.7 }, { 0, 0 }, { 50, 0.5 }, { 100, 1 } };
317 lr2dt_t lr2dt_vignette_table[] = { { 0, 74 }, { 4, 75 }, { 25, 85 }, { 50, 100 }, { 100, 100 } };
324 lr2dt_t lr2dt_grain_table[] = { { 0, 0 }, { 25, 20 }, { 50, 40 }, { 100, 80 } };
331 lr2dt_t lr2dt_grain_table[] = { { 0, 100 }, { 50, 100 }, { 75, 400 }, { 100, 800 } };
338 lr2dt_t lr2dt_splittoning_table[] = { { -100, 100 }, { 0, 0 }, { 100, 0 } };
345 lr2dt_t lr2dt_clarity_table[] = { { -100, -.650 }, { 0, 0 }, { 100, .650 } };
351 size_t imported_len,
int version,
int *import_count)
360 if(imported[0]) g_strlcat(imported,
", ", imported_len);
431 const char *iter = *startptr;
432 while(*iter ==
' ') iter++;
433 if(!g_str_has_prefix(iter,
key))
436 while(*iter ==
' ') iter++;
439 while(*iter ==
' ') iter++;
440 *
value = g_ascii_strtod(iter, (
char **)startptr);
441 return iter != *startptr;
446 const char *iter = *startptr;
447 while(*iter ==
' ') iter++;
448 if(!g_str_has_prefix(iter,
key))
451 while(*iter ==
' ') iter++;
454 while(*iter ==
' ') iter++;
455 while((*iter >=
'a' && *iter <=
'z') || (*iter >=
'A' && *iter <=
'Z')) iter++;
462 return *(*startptr)++ ==
',';
469 const float hfactor = 3.0 / 9.0;
470 const float lfactor = 4.0 / 9.0;
474 if(!xmlStrcmp(
name, (
const xmlChar *)
"CropTop"))
475 data->
pc.
cy = g_ascii_strtod((
char *)
value, NULL);
476 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropRight"))
477 data->
pc.
cw = g_ascii_strtod((
char *)
value, NULL);
478 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropLeft"))
479 data->
pc.
cx = g_ascii_strtod((
char *)
value, NULL);
480 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropBottom"))
481 data->
pc.
ch = g_ascii_strtod((
char *)
value, NULL);
482 else if(!xmlStrcmp(
name, (
const xmlChar *)
"CropAngle"))
484 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ImageWidth"))
486 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ImageLength"))
488 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Orientation"))
496 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HasCrop"))
500 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Blacks2012"))
502 int v = atoi((
char *)
value);
509 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Exposure2012"))
511 float v = g_ascii_strtod((
char *)
value, NULL);
518 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteAmount"))
520 int v = atoi((
char *)
value);
527 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteMidpoint"))
529 int v = atoi((
char *)
value);
532 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteStyle"))
534 int v = atoi((
char *)
value);
540 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteFeather"))
542 int v = atoi((
char *)
value);
545 else if(!xmlStrcmp(
name, (
const xmlChar *)
"PostCropVignetteRoundness"))
547 int v = atoi((
char *)
value);
550 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GrainAmount"))
552 int v = atoi((
char *)
value);
559 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GrainFrequency"))
561 int v = atoi((
char *)
value);
564 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricShadows"))
568 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricDarks"))
572 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricLights"))
576 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricHighlights"))
580 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricShadowSplit"))
584 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricMidtoneSplit"))
588 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ParametricHighlightSplit"))
592 else if(!xmlStrcmp(
name, (
const xmlChar *)
"ToneCurveName2012"))
594 if(!xmlStrcmp(
value, (
const xmlChar *)
"Linear"))
596 else if(!xmlStrcmp(
value, (
const xmlChar *)
"Medium Contrast"))
598 else if(!xmlStrcmp(
value, (
const xmlChar *)
"Strong Contrast"))
600 else if(!xmlStrcmp(
value, (
const xmlChar *)
"Custom"))
603 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentRed"))
605 int v = atoi((
char *)
value);
609 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentOrange"))
611 int v = atoi((
char *)
value);
615 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentYellow"))
617 int v = atoi((
char *)
value);
621 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentGreen"))
623 int v = atoi((
char *)
value);
627 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentAqua"))
629 int v = atoi((
char *)
value);
633 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentBlue"))
635 int v = atoi((
char *)
value);
639 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentPurple"))
641 int v = atoi((
char *)
value);
645 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SaturationAdjustmentMagenta"))
647 int v = atoi((
char *)
value);
651 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentRed"))
653 int v = atoi((
char *)
value);
657 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentOrange"))
659 int v = atoi((
char *)
value);
663 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentYellow"))
665 int v = atoi((
char *)
value);
669 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentGreen"))
671 int v = atoi((
char *)
value);
675 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentAqua"))
677 int v = atoi((
char *)
value);
681 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentBlue"))
683 int v = atoi((
char *)
value);
687 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentPurple"))
689 int v = atoi((
char *)
value);
693 else if(!xmlStrcmp(
name, (
const xmlChar *)
"LuminanceAdjustmentMagenta"))
695 int v = atoi((
char *)
value);
699 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentRed"))
701 int v = atoi((
char *)
value);
705 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentOrange"))
707 int v = atoi((
char *)
value);
711 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentYellow"))
713 int v = atoi((
char *)
value);
717 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentGreen"))
719 int v = atoi((
char *)
value);
723 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentAqua"))
725 int v = atoi((
char *)
value);
729 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentBlue"))
731 int v = atoi((
char *)
value);
735 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentPurple"))
737 int v = atoi((
char *)
value);
741 else if(!xmlStrcmp(
name, (
const xmlChar *)
"HueAdjustmentMagenta"))
743 int v = atoi((
char *)
value);
747 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningShadowHue"))
749 int v = atoi((
char *)
value);
753 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningShadowSaturation"))
755 int v = atoi((
char *)
value);
759 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningHighlightHue"))
761 int v = atoi((
char *)
value);
765 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningHighlightSaturation"))
767 int v = atoi((
char *)
value);
771 else if(!xmlStrcmp(
name, (
const xmlChar *)
"SplitToningBalance"))
773 float v = g_ascii_strtod((
char *)
value, NULL);
776 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Clarity2012"))
778 int v = atoi((
char *)
value);
785 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Rating"))
787 int v = atoi((
char *)
value);
794 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GPSLatitude"))
799 data->
lat = latitude;
803 else if(!xmlStrcmp(
name, (
const xmlChar *)
"GPSLongitude"))
806 if(!isnan(longitude))
808 data->
lon = longitude;
812 else if(!xmlStrcmp(
name, (
const xmlChar *)
"Label"))
814 char *
v = g_utf8_casefold((
char *)
value, -1);
815 if(!g_strcmp0(
v, _(
"red")))
817 else if(!g_strcmp0(
v, _(
"yellow")))
819 else if(!g_strcmp0(
v, _(
"green")))
821 else if(!g_strcmp0(
v, _(
"blue")))
834 || !xmlStrcmp(
name, (
const xmlChar *)
"hierarchicalSubject")))
836 xmlNodePtr tagNode = node;
838 gboolean tag_change =
FALSE;
841 if(!xmlStrcmp(tagNode->name, (
const xmlChar *)
"li"))
843 xmlChar *cvalue = xmlNodeListGetString(doc, tagNode->xmlChildrenNode, 1);
851 tagNode = tagNode->next;
855 else if(!
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"RetouchInfo"))
857 xmlNodePtr riNode = node;
861 if(!xmlStrcmp(riNode->name, (
const xmlChar *)
"li"))
863 xmlChar *cvalue = xmlNodeListGetString(doc, riNode->xmlChildrenNode, 1);
865 float x, y, radius, xc, yc;
866 const char *startptr = (
const char *)cvalue;
890 riNode = riNode->next;
893 else if(!
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"ToneCurvePV2012"))
895 xmlNodePtr tcNode = node;
899 if(!xmlStrcmp(tcNode->name, (
const xmlChar *)
"li"))
901 xmlChar *cvalue = xmlNodeListGetString(doc, tcNode->xmlChildrenNode, 1);
903 if(sscanf((
const char *)cvalue,
"%d, %d",
908 tcNode = tcNode->next;
911 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"title"))
913 xmlNodePtr ttlNode = node;
916 if(!xmlStrncmp(ttlNode->name, (
const xmlChar *)
"li", 2))
918 xmlChar *cvalue = xmlNodeListGetString(doc, ttlNode->xmlChildrenNode, 1);
922 ttlNode = ttlNode->next;
925 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"description"))
927 xmlNodePtr desNode = node;
930 if(!xmlStrncmp(desNode->name, (
const xmlChar *)
"li", 2))
932 xmlChar *cvalue = xmlNodeListGetString(doc, desNode->xmlChildrenNode, 1);
936 desNode = desNode->next;
939 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"creator"))
941 xmlNodePtr creNode = node;
944 if(!xmlStrncmp(creNode->name, (
const xmlChar *)
"li", 2))
946 xmlChar *cvalue = xmlNodeListGetString(doc, creNode->xmlChildrenNode, 1);
950 creNode = creNode->next;
953 else if(
IS_NULL_PTR(dev) && !xmlStrcmp(
name, (
const xmlChar *)
"rights"))
955 xmlNodePtr rigNode = node;
958 if(!xmlStrncmp(rigNode->name, (
const xmlChar *)
"li", 2))
960 xmlChar *cvalue = xmlNodeListGetString(doc, rigNode->xmlChildrenNode, 1);
964 rigNode = rigNode->next;
972 return !strcmp(
name,
"subject")
973 || !strcmp(
name,
"hierarchicalSubject")
974 || !strcmp(
name,
"RetouchInfo")
975 || !strcmp(
name,
"ToneCurvePV2012")
976 || !strcmp(
name,
"title")
977 || !strcmp(
name,
"description")
978 || !strcmp(
name,
"creator")
979 || !strcmp(
name,
"publisher")
980 || !strcmp(
name,
"rights");
986 xmlXPathObject *xpathObj = xmlXPathEvalExpression(xpath, ctx);
990 const xmlNodeSetPtr xnodes = xpathObj->nodesetval;
991 const int n = xnodes->nodeNr;
993 for (
int k=0;
k<
n;
k++)
995 const xmlNode *node = xnodes->nodeTab[
k];
999 xmlNodePtr listnode = node->xmlChildrenNode;
1000 if (listnode) listnode = listnode->next;
1001 if (listnode) listnode = listnode->xmlChildrenNode;
1002 if (listnode) listnode = listnode->next;
1003 if (listnode)
_lrop(dev, doc, imgid, node->name, NULL, listnode, data);
1007 const xmlChar *
value = xmlNodeListGetString(doc, node->children, 1);
1008 _lrop(dev, doc, imgid, node->name,
value, NULL, data);
1012 xmlXPathFreeObject(xpathObj);
1016static inline void flip(
float *
x,
float *y)
1018 const float tmp = *
x;
1023static inline void swap(
float *
x,
float *y)
1025 const float tmp = *
x;
1030static inline double rotate_x(
double x,
double y,
const double rangle)
1032 return x*cos(rangle) + y*sin(rangle);
1035static inline double rotate_y(
double x,
double y,
const double rangle)
1037 return -
x*sin(rangle) + y*cos(rangle);
1040static inline void rotate_xy(
double *cx,
double *cy,
const double rangle)
1042 const double x = *cx;
1043 const double y = *cy;
1050 return round(
x * 100000.f) / 100000.f;
1055 gboolean refresh_needed =
FALSE;
1056 char imported[256] = { 0 };
1071 xmlNodePtr entryNode;
1075 doc = xmlReadFile(pathname, NULL, 0);
1085 entryNode = xmlDocGetRootElement(doc);
1094 if(xmlStrcmp(entryNode->name, (
const xmlChar *)
"xmpmeta"))
1096 if(!iauto)
dt_control_log(_(
"`%s' not a lightroom XMP!"), pathname);
1103 xmlXPathContextPtr xpathCtx = xmlXPathNewContext(doc);
1112 xmlXPathRegisterNs(xpathCtx, BAD_CAST
"stEvt", BAD_CAST
"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#");
1114 xmlXPathObjectPtr xpathObj = xmlXPathEvalExpression((
const xmlChar *)
"//@stEvt:softwareAgent", xpathCtx);
1118 if(!iauto)
dt_control_log(_(
"`%s' not a lightroom XMP!"), pathname);
1119 xmlXPathFreeContext(xpathCtx);
1125 xmlNodeSetPtr xnodes = xpathObj->nodesetval;
1129 xmlNodePtr xnode = xnodes->nodeTab[0];
1130 xmlChar *
value = xmlNodeListGetString(doc, xnode->xmlChildrenNode, 1);
1132 if(!strstr((
char *)
value,
"Lightroom") && !strstr((
char *)
value,
"Camera Raw"))
1134 xmlXPathFreeContext(xpathCtx);
1135 xmlXPathFreeObject(xpathObj);
1138 if(!iauto)
dt_control_log(_(
"`%s' not a lightroom XMP!"), pathname);
1159 memset(&data, 0,
sizeof(data));
1190 BAD_CAST
"http://ns.adobe.com/camera-raw-settings/1.0/");
1194 BAD_CAST
"http://purl.org/dc/elements/1.1/");
1198 BAD_CAST
"http://ns.adobe.com/tiff/1.0/");
1202 BAD_CAST
"http://ns.adobe.com/xap/1.0/");
1206 BAD_CAST
"http://ns.adobe.com/exif/1.0/");
1210 BAD_CAST
"http://ns.adobe.com/lightroom/1.0/");
1214 BAD_CAST
"http://www.w3.org/1999/02/22-rdf-syntax-ns#");
1217 static char *
names[] = {
"crs",
"dc",
"tiff",
"xmp",
"exif",
"lr", NULL };
1224 snprintf(expr,
sizeof(expr),
"//%s:*",
names[
i]);
1225 _handle_xpath(dev, doc, imgid, xpathCtx, (
const xmlChar *)expr, &data);
1228 snprintf(expr,
sizeof(expr),
"//@%s:*",
names[
i]);
1229 _handle_xpath(dev, doc, imgid, xpathCtx, (
const xmlChar *)expr, &data);
1232 xmlXPathFreeObject(xpathObj);
1233 xmlXPathFreeContext(xpathCtx);
1245 refresh_needed =
TRUE;
1251 double cx, cw, cy,
ch;
1252 double new_width, new_height;
1284 data.
pc.
cx =
round5((cx / new_width) + 0.5f);
1285 data.
pc.
cw =
round5((cw / new_width) + 0.5f);
1286 data.
pc.
cy =
round5((cy / new_height) + 0.5f);
1311 refresh_needed =
TRUE;
1320 refresh_needed =
TRUE;
1327 refresh_needed =
TRUE;
1336 refresh_needed =
TRUE;
1341 const float base_ratio = 1.325 / 1.5;
1364 float dscale = (1 - (newratio / data.
pv.
whratio)) / 2.0;
1366 data.
pv.
scale -= dscale * 100.0;
1372 refresh_needed =
TRUE;
1391 refresh_needed =
TRUE;
1408 float linear_ab[7] = { 0.0, 0.08, 0.3, 0.5, 0.7, 0.92, 1.0 };
1435 for(
int k = 0;
k < total_pts;
k++)
1459 refresh_needed =
TRUE;
1466 for(
int i = 0;
i < 3;
i++)
1467 for(
int k = 0;
k < 8;
k++)
1472 refresh_needed =
TRUE;
1481 refresh_needed =
TRUE;
1491 refresh_needed =
TRUE;
1496 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1497 g_strlcat(imported, _(
"tags"),
sizeof(imported));
1505 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1506 g_strlcat(imported, _(
"rating"),
sizeof(imported));
1518 imgs = g_list_prepend(imgs, GINT_TO_POINTER(imgid));
1521 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1522 g_strlcat(imported, _(
"geotagging"),
sizeof(imported));
1530 if(imported[0]) g_strlcat(imported,
", ",
sizeof(imported));
1531 g_strlcat(imported, _(
"color label"),
sizeof(imported));
1537 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)
void dt_colorlabels_set_label(const int32_t imgid, const int color)
#define DT_IOP_COLORZONES_BANDS
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,...)
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_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.
void dt_dev_history_gui_update(struct dt_develop_t *dev)
Apply history-loaded params to module GUIs.
GHashTable * names
GtkWidget* -> the name the application knows it by.
gboolean dt_history_repository_write_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)
gboolean dt_history_repository_set_end(const int32_t imgid, const int32_t history_end)
int32_t dt_history_repository_get_next_num(const int32_t imgid)
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
#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 dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
#define DT_MAX_FILENAME_LEN
The colour-profile vocabulary, and nothing else.
dt_iop_color_intent_t
ICC rendering intent, as stored in iop params and in conf.
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,...)
struct dt_control_signal_t * dt_control_signal_get_global(void)
@ 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
static const dt_aligned_pixel_simd_t value
const float const int flip
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
Telling the user something happened.
double dt_util_gps_string_to_number(const gchar *input)