VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructor / VintasoftImage Constructor(Stream,Boolean)
The stream which contains the image.
Determines that stream must be closed after use.
Example



In This Topic
    VintasoftImage Constructor(Stream,Boolean)
    In This Topic
    Initializes a new instance of the VintasoftImage class.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal stream As Stream, _
       ByVal closeStreamAfterUse As Boolean _
    )
    public VintasoftImage( 
       Stream stream,
       bool closeStreamAfterUse
    )
    public: VintasoftImage( 
       Stream* stream,
       bool closeStreamAfterUse
    )
    public:
    VintasoftImage( 
       Stream^ stream,
       bool closeStreamAfterUse
    )

    Parameters

    stream
    The stream which contains the image.
    closeStreamAfterUse
    Determines that stream must be closed after use.
    Remarks
    Supported image formats: BMP, DICOM, EMF, GIF, animated GIF, Icon, JBIG2, multipage JBIG2, JPEG, JPEG-LS, JPEG2000, PCX, PDF, multipage PDF, PNG, TIFF, multipage TIFF, WMF.
    Example
    This example shows how to load image from stream (stream will be closed automatically when image is disposed).
    Dim filepath As String = "D:\Example.tiff"
    ' open a file stream
    Dim stream As System.IO.Stream = System.IO.File.Open(filepath, System.IO.FileMode.Open)
    ' create image from stream (stream will be closed automatically when image is disposed)
    		' ...
    Using image As New Vintasoft.Imaging.VintasoftImage(stream, True)
    End Using
    string filepath = @"D:\Example.tiff";
    // open a file stream
    System.IO.Stream stream = System.IO.File.Open(filepath, System.IO.FileMode.Open);
    // create image from stream (stream will be closed automatically when image is disposed)
    using (Vintasoft.Imaging.VintasoftImage image = 
        new Vintasoft.Imaging.VintasoftImage(stream, true))
    {
        // ...
    }
    Requirements

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

    See Also