File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 271
271
#include "jpeg.h"
272
272
#endif /*HAVE_JPEG*/
273
273
274
+
274
275
/* Aperio TIFFs (svs) use these compression types for jp2k-compressed tiles.
275
276
*/
276
277
#define JP2K_YCC 33003
280
281
*/
281
282
#define JP2K_LOSSY 33004
282
283
284
+ // only in recent libtiffs
285
+ #ifndef TIFFTAG_IMAGESOURCEDATA
286
+ #define TIFFTAG_IMAGESOURCEDATA (37724)
287
+ #endif
288
+
283
289
/* Compression types we handle ourselves.
284
290
*/
285
291
static int rtiff_we_decompress [] = {
@@ -1904,6 +1910,9 @@ rtiff_set_header(Rtiff *rtiff, VipsImage *out)
1904
1910
if (TIFFGetField (rtiff -> tiff , TIFFTAG_PHOTOSHOP , & data_len , & data ))
1905
1911
vips_image_set_blob_copy (out , VIPS_META_PHOTOSHOP_NAME , data , data_len );
1906
1912
1913
+ if (TIFFGetField (rtiff -> tiff , TIFFTAG_IMAGESOURCEDATA , & data_len , & data ))
1914
+ vips_image_set_blob_copy (out , VIPS_META_PHOTOSHOP_DATA , data , data_len );
1915
+
1907
1916
if (rtiff -> header .image_description )
1908
1917
vips_image_set_string (out , VIPS_META_IMAGEDESCRIPTION ,
1909
1918
rtiff -> header .image_description );
Original file line number Diff line number Diff line change @@ -67,6 +67,14 @@ extern "C" {
67
67
*/
68
68
#define VIPS_META_PHOTOSHOP_NAME "photoshop-data"
69
69
70
+ /**
71
+ * VIPS_META_PHOTOSHOP_DATA:
72
+ *
73
+ * The name that TIFF read and write operations use for the image's
74
+ * TIFFTAG_IMAGESOURCEDATA data.
75
+ */
76
+ #define VIPS_META_PHOTOSHOP_DATA "photoshop-image-data"
77
+
70
78
/**
71
79
* VIPS_META_ICC_NAME:
72
80
*
You can’t perform that action at this time.
0 commit comments