Author: post
Date: 2013-03-26 12:12:22 +0100 (Tue, 26 Mar 2013)
New Revision: 4330
Modified:
trunk/librawstudio/rs-huesat-map.c
trunk/librawstudio/rs-huesat-map.h
trunk/librawstudio/rs-tiff-ifd-entry.c
Log:
Read DCP v1.4 V-encoding (sRGB lightness profiles).
Modified: trunk/librawstudio/rs-huesat-map.c
===================================================================
--- trunk/librawstudio/rs-huesat-map.c 2013-02-13 11:34:15 UTC (rev 4329)
+++ trunk/librawstudio/rs-huesat-map.c 2013-03-26 11:12:22 UTC (rev 4330)
@@ -61,6 +61,7 @@
map->val_step = hue_divisions * map->hue_step;
map->deltas = g_new0(RS_VECTOR3, rs_huesat_map_get_deltacount(map));
+ map->v_encoding = 0;
return map;
}
@@ -111,6 +112,18 @@
}
}
+ if (NULL == map)
+ return map;
+
+ entry = NULL;
+ if (table_tag == 50938 || table_tag == 50939) /* ProfileHueSatMapData1
or ProfileHueSatMapData2*/
+ entry = rs_tiff_get_ifd_entry(tiff, ifd, 51107);
/*ProfileHueSatMapEncoding */
+ else if (table_tag == 50982) /* ProfileLookTableData */
+ entry = rs_tiff_get_ifd_entry(tiff, ifd, 51108);
/*ProfileLookTableEncoding*/
+
+ if (NULL != entry && entry->count == 1)
+ map->v_encoding = entry->value_offset;
+
return map;
}
@@ -150,6 +163,7 @@
data2++;
data3++;
}
+ map->v_encoding = map1->v_encoding;
}
return map;
Modified: trunk/librawstudio/rs-huesat-map.h
===================================================================
--- trunk/librawstudio/rs-huesat-map.h 2013-02-13 11:34:15 UTC (rev 4329)
+++ trunk/librawstudio/rs-huesat-map.h 2013-03-26 11:12:22 UTC (rev 4330)
@@ -42,6 +42,7 @@
guint val_step;
RS_VECTOR3 *deltas;
+ gint v_encoding;
} RSHuesatMap;
typedef struct {
Modified: trunk/librawstudio/rs-tiff-ifd-entry.c
===================================================================
--- trunk/librawstudio/rs-tiff-ifd-entry.c 2013-02-13 11:34:15 UTC (rev
4329)
+++ trunk/librawstudio/rs-tiff-ifd-entry.c 2013-03-26 11:12:22 UTC (rev
4330)
@@ -184,6 +184,8 @@
{ 0xc741, "OpcodeList2" },
{ 0xc74e, "OpcodeList3" },
{ 0xc761, "NoiseProfile" },
+ { 51107, "ProfileHueSatMapEncoding"},
+ { 51108, "ProfileLookTableEncoding"},
{ 0x0, NULL }
};
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit