Get the ID of current page of GdViewer

Discussions about document viewing.
Post Reply
steviessp
Posts: 2
Joined: Tue Jun 26, 2012 4:22 pm

Get the ID of current page of GdViewer

Post by steviessp » Tue Jun 26, 2012 4:32 pm

Hi! I was looking at your examples but couldn't get it working for me! I need to open multipage Tiff file and make some modification to some or just one of the pages, and save those modifications. What I do is
imageID = imaging.TiffCreateMultiPageFromFile(ofd.FileName);
gdViewer1.DisplayFromGdPictureImage(imageID);
After the modification im trying to save using:
imaging.TiffSaveMultiPageToFile(imageID, fileName, TiffCompression.TiffCompressionAUTO);
but no luck saving the modification.
So one thing is what am i doing wrong here and the second and probably more important: how can i get the ID of the image that's showed and modified in the gdViewer?

Thank you for the answer in advance!

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Get the ID of current page of GdViewer

Post by SamiKharma » Tue Jun 26, 2012 6:18 pm

Hi,

You cannot get an ImageID from a displayed image in a GdViewer, simply because the GdViewer does NOT own the image, and that it is the way it was designed and its functions are exposed, because after all it is a Viewer and it would violate not only coding standards, but also simple Object Abstraction.

That being said, I cannot guess at what you are going exactly, but if I am to make a suggestion, use the following two functions consecutively:
https://www.gdpicture.com/guides/gdpicture/v8/html/con ... aging.html
https://www.gdpicture.com/guides/gdpicture/v8/html/con ... teger.html

Best Regards,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests