VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructors / VintasoftImage Constructor(Stream)
Syntax Remarks Example Requirements SeeAlso
In This Topic
VintasoftImage Constructor(Stream)
In This Topic
Initializes a new instance of the VintasoftImage class.
Syntax
'Declaration

Public Function New( _
ByVal stream
The stream which contains the image.
As System.IO.Stream _
)
public VintasoftImage(
System.IO.Stream stream
)

Parameters

stream
The stream which contains the image.
Remarks

Supported image formats: BMP, DICOM, DOCX, XLSX, EMF, GIF, Icon, JBIG2, JPEG, JPEG-LS, JPEG2000, PCX, PDF, PNG, RAW, TIFF, WMF.

Example

This C#/VB.NET code shows how to load image from stream (user must close the stream when image is disposed).


Dim filepath As String = "D:\Example.tiff"
' open a file stream
Using stream As System.IO.Stream = System.IO.File.Open(filepath, System.IO.FileMode.Open)
    ' create image from stream (user must close the stream when image is disposed)
            ' ...
    Using image As New Vintasoft.Imaging.VintasoftImage(stream)
    End Using
End Using


string filepath = @"D:\Example.tiff";
// open a file stream
using (System.IO.Stream stream = 
    System.IO.File.Open(filepath, System.IO.FileMode.Open))
{
    // create image from stream (user must close the stream when image is disposed)
    using (Vintasoft.Imaging.VintasoftImage image = 
        new Vintasoft.Imaging.VintasoftImage(stream))
    {
        // ...
    }
}

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