Working with tags on Multipage Tiff

Discussions about image processing and document imaging.
Post Reply
Dabi123
Posts: 22
Joined: Mon Apr 28, 2008 9:28 pm

Working with tags on Multipage Tiff

Post by Dabi123 » Thu May 15, 2008 6:08 pm

Hi,
I am not sure but I am trrying to add some metadata to my image files using AxImaging.ExifTagSetValueString.
It works fine if its a single page tiff.
I have a situation wherein I write metadat to a file and save it(works fine). Then when I add another page to the file (add new metadata to the new page) all the metadata is lost. The 1st page has only the X and Y resolution, but what i worte earlier is lost and also in the newly added page there's no metadata???
Is this a bug
I have set TagsSetPreserve to True for AxImaging object

Thanks

User avatar
Loïc
Site Admin
Posts: 5743
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Working with tags on Multipage Tiff

Post by Loïc » Mon May 19, 2008 1:46 pm

Hi,

We solved a bug with metadata support for multipage tiff image.

Could you download the last edition & try again ?

Best regards,

Loïc

Dabi123
Posts: 22
Joined: Mon Apr 28, 2008 9:28 pm

Re: Working with tags on Multipage Tiff

Post by Dabi123 » Mon May 19, 2008 5:33 pm

Hi,
Are you referring to the 5.4.3 release. I have downloaded and reinstalled this version. Metadata on the pages is restored however, I noticed another problem.
If I have a 2 page tiff and I try to append another page, it overwrites the Tiff. So I cannot have more than 2 pages now?
My code was working fine earlier(except the metadat part). Now after thi release it is not letting me create more than 2 pages as it always overwrites the 2nd page when I intend to add more pages to the Tiff???

iImageID = AxImagingTest.TiffCreateMultiPageFromFile(path) ' read the exisiting file and append new pages to this
AxImagingTest.TiffSaveAsNativeMultiPage(path)

iAddImageID = FormMain.AxImaging1.GetNativeImage 'page to be appended
AxImagingTest.TagsSetPreserve(True)
AxImagingTest.TiffAddToNativeMultiPage(iAddImageID)
AxImagingTest.CloseImage(iAddImageID)
AxImagingTest.TiffCloseNativeMultiPage()

User avatar
Loïc
Site Admin
Posts: 5743
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Working with tags on Multipage Tiff

Post by Loïc » Mon May 19, 2008 5:43 pm

Hi,

Your code is wrong.

If you want to edit an existing multipage image & append page on it, you have to do something like that:

Code: Select all

nTiffID = Imaging1.TiffCreateMultiPageFromFile("input.tif")
Call Imaging1.TiffAppendPageFromFile(nTiffID, "imagetoadd.tif")
Call Imaging1.TiffSaveMultiPageToFile(nTiffID, "output.tif")
Loïc

Dabi123
Posts: 22
Joined: Mon Apr 28, 2008 9:28 pm

Re: Working with tags on Multipage Tiff

Post by Dabi123 » Mon May 19, 2008 5:59 pm

Thanks once again :)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests