Product Info
TestimonialsBecause of the quality of your products and, even more, because of your quick and effective technical support I would recommend your .NET products to anyone. We are using Scan, Imaging and Annotation in few of our products, for over one year, without any problems. Ninoslav Rasinec |
VintaSoftImaging.NET SDK - FAQGeneral questions:
Redistribution:
Image preview:
TIFF:
For which purposes can I use the VintaSoftImaging.NET SDK?Library allows to load, view, process, print and save images, work with multipage TIFF files directly, work with annotations.
From which parts does the library consist?The library contains:
What is the difference between versions of assembly?1. Bin\v2.0\Vintasoft.Imaging.dll file Version features:
2. Bin\v2.0\64-bit\Vintasoft.Imaging.dll file Version features:
In which programming languages can I use the Vintasoft.Imaging component?With the Single Developer license or Site license you can use library in:
With the Server license you can use library in:
What restrictions does the unregistered version have?Unregistered version has the following restrictions:
All these restrictions are removed in registered version.
I have problems. What should I do?Answers to most of questions can be found in the documentation or in this FAQ. Please write to our support team to get more help.
What files do I need to include in the setup package of my program?You need include only one file: Vintasoft.Imaging.dll. This file must be placed in the same folder as the assembly that references it. Make sure that the version you distribute is the version your assembly was compiled with.
Can I re-distribute the VintaSoft.Imaging.dll with my application without royalties?Yes, the library is royalty free. You pay only for registration one time.
Can I add two thumbnail viewers to a form of my application and move images between them?Yes, you can do this. Please see example 7 here.
Does image viewer supports scale to gray (antialiasing) option on displaying the black-white images?Yes, image viewer supports scale to gray option since version 2.2. This option can be enabled using the ScaleToGray property of the ImageViewer object.
I want to store images in the separate image collection and preview only necessary one. Can I do this?Yes, you can store images in a separate collection of images and preview only necessary image in the image viewer.
[VB.NET]
' Create the image collection and load images.
Dim images As ImageCollection = New ImageCollection
images.Add("test-image1.jpg")
images.Add("test-image2.png")
images.Add("test-image3.gif")
images.Add("test-image4.bmp")
images.Add("test-image5.jpg")
' Preview the first image from collection.
imageViewer1.Images.Add(images(0))
...
' Preview the second image from collection.
' Remove the first image from the image viewer.
imageViewer1.Images.RemoveAt(0)
' Preview the second image in the image viewer.
imageViewer1.Images.Add(images(1))
...
' Returns back to the first image.
' Remove the second image from the image viewer.
imageViewer1.Images.RemoveAt(0)
' Preview the first image in the image viewer.
imageViewer1.Images.Add(images(0))
...
I want to load image file in the viewer and delete file after loading. How can I do this?Viewer must have access to the image data while it works with the image. You should do the following steps if you want to load image file into the viewer and delete file after loading:
I cannot open TIFF file using your library. What should I do?Please send us your "bad" file. We will analyze it and update our reading algorithm if image is correct.
How can I split multipage TIFF file to many JPEG files?
[VB.NET]
Dim images As ImageCollection = New ImageCollection()
images.Add("multipage.tif")
Dim i As Integer
For i = 0 To images.Count - 1
images(i).Save("page-" + i.ToString() + ".jpg")
Next i
[C#]
ImageCollection images = new ImageCollection();
images.Add("multipage.tif");
for (int i = 0; i < images.Count; i++)
{
images[i].Save("page-" + i.ToString() + ".jpg");
}
How can I change resolution of the image in TIFF file without loading the image from file?Resolution of the image is stored in metadata of TIFF page so you can change resolution without loading image from the file.
[VB.NET]
Dim tiff As TiffFile = New TiffFile("multipage.tif")
Dim page As TiffPage = tiff.Pages(necessaryPage)
Dim tags As TiffTagCollection = page.Tags
' The Add method adds/updates a tag of TIFF page.
tags.Add(TiffTagId.XResolution, New Rational(300, 1))
tags.Add(TiffTagId.YResolution, New Rational(300, 1))
tags.SaveChanges()
tiff.Dispose()
[C#]
TiffFile tiff = new TiffFile("multipage.tif");
TiffPage page = tiff.Pages[necessaryPage];
TiffTagCollection tags = page.Tags;
// The Add method adds/updates a tag of TIFF page.
tags.Add(TiffTagId.XResolution, new Rational(300, 1));
tags.Add(TiffTagId.YResolution, new Rational(300, 1));
tags.SaveChanges();
tiff.Dispose();
I want to print all images from multipage TIFF file. What is the best code for this?Here is an example for C#:
[C#]
int currentPrintIndex;
private void allPagesPrintToolStripMenuItem_Click(object sender, EventArgs e)
{
PrintAllPages = true;
currentPrintIndex = 0;
imagePrintDocument1.PrintScaleMode = PrintScaleMode.BestFit;
imagePrintDocument1.Print();
}
private void imagePrintDocument1_PrintImage(object sender, Vintasoft.Imaging.Print.PrintImageEventArgs e)
{
e.HasMoreImages = false;
if (PrintAllPages)
{
if (currentPrintIndex < imageViewer1.Images.Count - 1)
{
e.Image = imageViewer1.Images[currentPrintIndex].GetImage();
currentPrintIndex++;
if (currentPrintIndex >= imageViewer1.Images.Count)
{
e.HasMoreImages = false;
}
else
{
e.HasMoreImages = true;
}
}
}
else
e.Image = imageViewer1.Images[imageViewer1.FocusedIndex].GetImage();
}
How can I save ImageCollection to a stream as multipage TIFF image?Here is the first way:
[C#]
// using Vintasoft.Image and TiffEncoder
VintasoftImage vsImage1 = new VintasoftImage("image1.png");
VintasoftImage vsImage2 = new VintasoftImage("image2.jpg");
TiffEncoder tiffEncoder = new TiffEncoder(false);
MemoryStream mem = new MemoryStream();
vsImage1.Save(mem, tiffEncoder);
vsImage2.Save(mem, tiffEncoder);
and here is the second way:
[C#]
// using TiffFile
VintasoftImage vsImage1 = new VintasoftImage("image1.png");
VintasoftImage vsImage2 = new VintasoftImage("image2.jpg");
MemoryStream mem = new MemoryStream();
TiffFile tiff = new TiffFile(mem, false);
tiff.Pages.Add(vsImage1.GetImage());
tiff.Pages.Add(vsImage2.GetImage());
|