summaryrefslogtreecommitdiff
path: root/libtiff/tif_dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtiff/tif_dir.c')
-rw-r--r--libtiff/tif_dir.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c
index 63dea966..f8cc591a 100644
--- a/libtiff/tif_dir.c
+++ b/libtiff/tif_dir.c
@@ -424,6 +424,25 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
td->td_profileLength);
break;
#endif
+#ifdef PHOTOSHOP_SUPPORT
+ case TIFFTAG_PHOTOSHOP:
+ td->td_photoshopLength = (uint32) va_arg(ap, uint32);
+ _TIFFsetByteArray (&td->td_photoshopData, va_arg(ap, void*),
+ td->td_photoshopLength);
+ break;
+#endif
+#ifdef IPTC_SUPPORT
+ case TIFFTAG_RICHTIFFIPTC:
+ td->td_richtiffiptcLength = (uint32) va_arg(ap, uint32);
+#ifdef PHOTOSHOP_SUPPORT
+ _TIFFsetLongArray ((uint32**)&td->td_richtiffiptcData, va_arg(ap, uint32*),
+ td->td_richtiffiptcLength);
+#else
+ _TIFFsetByteArray (&td->td_photoshopData, va_arg(ap, void*),
+ td->td_photoshopLength);
+#endif
+ break;
+#endif
default:
/*
* This can happen if multiple images are open with
@@ -752,6 +771,18 @@ _TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
*va_arg(ap, void**) = td->td_profileData;
break;
#endif
+#ifdef PHOTOSHOP_SUPPORT
+ case TIFFTAG_PHOTOSHOP:
+ *va_arg(ap, uint32*) = td->td_photoshopLength;
+ *va_arg(ap, void**) = td->td_photoshopData;
+ break;
+#endif
+#ifdef IPTC_SUPPORT
+ case TIFFTAG_RICHTIFFIPTC:
+ *va_arg(ap, uint32*) = td->td_richtiffiptcLength;
+ *va_arg(ap, void**) = td->td_richtiffiptcData;
+ break;
+#endif
default:
/*
* This can happen if multiple images are open with
@@ -849,6 +880,12 @@ TIFFFreeDirectory(TIFF* tif)
#ifdef ICC_SUPPORT
CleanupField(td_profileData);
#endif
+#ifdef PHOTOSHOP_SUPPORT
+ CleanupField(td_photoshopData);
+#endif
+#ifdef IPTC_SUPPORT
+ CleanupField(td_richtiffiptcData);
+#endif
CleanupField(td_stripoffset);
CleanupField(td_stripbytecount);
}