VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging Namespace / ImageCollection Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
ImageCollection Class
In This Topic
Represents a collection of images.
Object Model
VintasoftImage ImageCollection
Syntax
'Declaration

<DefaultMemberAttribute("Item")>
Public NotInheritable Class ImageCollection

[DefaultMember("Item")]
public sealed class ImageCollection

Remarks

Class allows to:

  • add/insert any number of image files to the collection
  • add/insert all pages of multipage GIF/JBIG2/PDF/TIFF/DOCX/XLSX file to the collection
  • add/insert any number of image objects to the collection
  • swap images in the collection
  • remove image(s) from the collection
  • save all images of collection to multipage JBIG2/TIFF file or PDF document asynchronously or synchronously

Example

This C#/VB.NET code shows how to load three image files and save them asynchronously to multipage TIFF file.


Class ImageCollectionExample
    Public Sub RunExample()
        ' create image collection
        Dim images As New Vintasoft.Imaging.ImageCollection()

        ' add several images into collection
        ' [ do not forget to set your image file paths here! ]
        images.Add("test.bmp")
        images.Add("multipage.tif")
        images.Add("animated.gif")

        ' subscribe to progress event
        AddHandler images.ImageCollectionSavingProgress, New System.EventHandler(Of Vintasoft.Imaging.ProgressEventArgs)(AddressOf images_ImageCollectionSavingProgress)

        ' save the collection to the new file
        images.SaveAsync("output-multipage.tif")
    End Sub

    Private Sub images_ImageCollectionSavingProgress(sender As Object, e As Vintasoft.Imaging.ProgressEventArgs)
        ' update progress info using e.Progress property
        ' ...

        ' cancel image collection saving using e.Cancel property if necessary
        ' ...
    End Sub

End Class


class ImageCollectionExample
{
    public void RunExample()
    {
        // create image collection
        Vintasoft.Imaging.ImageCollection images = 
            new Vintasoft.Imaging.ImageCollection();

        // add several images into collection
        // [ do not forget to set your image file paths here! ]
        images.Add("test.bmp");
        images.Add("multipage.tif");
        images.Add("animated.gif");

        // subscribe to progress event
        images.ImageCollectionSavingProgress += 
            new System.EventHandler<Vintasoft.Imaging.ProgressEventArgs>(images_ImageCollectionSavingProgress);

        // save the collection to the new file
        images.SaveAsync("output-multipage.tif");
    }

    void images_ImageCollectionSavingProgress(object sender, Vintasoft.Imaging.ProgressEventArgs e)
    {
        // update progress info using e.Progress property
        // ...

        // cancel image collection saving using e.Cancel property if necessary
        // ...
    }

}

Inheritance Hierarchy

System.Object
   Vintasoft.Imaging.ImageCollection

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also