VintaSoft Imaging .NET SDK v8.6
Vintasoft.Imaging Namespace / ImageCollection Class
Members Example



In This Topic
    ImageCollection Class
    In This Topic
    Represents a collection of images.
    Object Model
    ImageCollection ClassVintasoftImage Class
    Syntax
    'Declaration
     
    <DefaultMemberAttribute("Item")>
    Public NotInheritable Class ImageCollection 
       Inherits System.Collections.CollectionBase
    [DefaultMember("Item")]
    public sealed class ImageCollection : System.Collections.CollectionBase 
    [DefaultMember("Item")]
    public __gc __sealed class ImageCollection : public System.Collections.CollectionBase 
    [DefaultMember("Item")]
    public ref class ImageCollection sealed : public System.Collections.CollectionBase 
    Remarks
    Class allows to:
    • add/insert any number of image files to the collection
    • add/insert all pages of multipage GIF/JBIG2/PDF/TIFF file to the collection
    • add/insert any number of an System.Drawing.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 example demonstrates 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
       System.Collections.CollectionBase
          Vintasoft.Imaging.ImageCollection

    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also