Custom TAG deleted after InsertTIFFImage

Document Imaging SDK,
Image SDK,
TIFF SDK,
Annotation SDK,
Cover Page Generator

Moderator: Technical Support Team

Custom TAG deleted after InsertTIFFImage

Postby ScottWGast » Wed Dec 28, 2011 10:32 am

I am storing a TAG value into a multipage TIFF file, but when I save the image using InsertTIFFImage, the TAG value disappears.

<snip>
strDate := Self.editCollationDate.Text;
BITIffObj := TBITiff.Create((ActiveMDIChild as TMDIChild));
iCurrentPage := (ActiveMDIChild as TMDIChild).nCurrentPage;
BITiffObj.DeleteTag(m_szFilePath, iCurrentPage, C_TIFF_COLLATIONDATE_TAG);
if BITiffObj.AddStringTag(m_szFilePath, iCurrentPage, C_TIFF_COLLATIONDATE_TAG, strDate) then
ShowMessage('TAG ' + strDate + ' saved.');
BITiffObj.Destroy;
<snip>

The above code successfully adds the date into the tag (C_TIFF_COLLATIONDATE_TAG) so that if I just exit from the program the TAG is in place, so I guess that the AddStringTag writes directly to the disk file. I am able to flip through the pages of the TIFF image and successfully retrieve and display the value stored in C_TIFF_COLLATIONDATE_TAG for each page. I can exit and reload the .TIF file and the values are still in the file.

If I rotate (or otherwise manipulate) a page, I must use the InsertTIFFImage function to save that new version of the page, but after I call InsertTIFFImage, the value of the tag C_TIFF_COLLATIONDATE_TAG is gone.


Any insight would be helpful.

TY,
Scott Gast
ScottWGast
 
Posts: 6
Joined: Wed Jul 15, 2009 9:42 am

Return to Imaging Toolkits



Who is online

Users browsing this forum: No registered users and 1 guest

cron