VintaSoft Annotation .NET Plug-in Discussions
Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.
Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions
//save files
for (int i = 0; i < imageViewer1.Images.Count; i++)
{
//save each image as single file
VintasoftImage img = imageViewer1.Images[i] as VintasoftImage;
string newImageFileName = string.Format("{0}_{1}{2}", fileName, i.ToString().PadLeft(4, '0'), fileExt);
if (encoder != null)
{
img.Save(newImageFileName, encoder);
}
else
{
img.Save(newImageFileName);
}
if (saveAnnotationsToolStripMenuItem.Checked)
{
//save annotations
SaveAnnotations(i, ChangeFileExtension(newImageFileName, EXT_XMP));
}
} ...
private void SaveAnnotations(int imageIndex, string filePath)
{
if (imageViewer1.Annotations[imageIndex].Count > 0)
{
XmlDocument doc = imageViewer1.Annotations[imageIndex].Save();
doc.Save(filePath);
}
}
The problem I have is that I can't get this working with multipage TIFF's. As far as I'm aware, I can only save multipage TIFFs by calling Save() on an ImageCollection. But when you do this, it ALWAYS saves the annotations (apparently within the TIFF file as I can't see a separate XMP file - is that correct?). What I want to do is:TiffEncoder tiffEncoder = TiffEncoder(false);
for (int i = 0; i < imageViewer1.Images.Count; i++)
{
//save each image as single file
VintasoftImage img = imageViewer1.Images[i] as VintasoftImage;
string newImageFileName = string.Format("{0}_{1}{2}", fileName, i.ToString().PadLeft(4, '0'), fileExt);
img.Save(newImageFileName, tiffEncoder);
}
Best regards, Alexander
1. Save all images in ThumbnailViewer as a Multipage TIFF without annotationsThe ability to save annotations as separate XMP files for each image (single or multipage TIFF) is looking increasingly important to our business model. I've got this working for non-multipage TIFF files ("all" and "selected" in thumbnailviewer) but not multipage ones (requirements 2 and 4). Is it possible to do this?
2. Save all images in ThumbnailViewer as a Multipage TIFF with separate XMP file
3. Save selected images in ThumbnailViewer as a Multipage TIFF without annotations
4. Save selected images in ThumbnailViewer as a Multipage TIFF with separate XMP file