VintaSoft Imaging .NET SDK 15.2: Documentation for .NET developer
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructors / VintasoftImage Constructor(Stream,Boolean)
Syntax Remarks Example Requirements SeeAlso
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
The stream which contains the image.
As System.IO.Stream, _
ByVal closeStreamAfterUse
A value indicating whether the stream must be closed after use.
As Boolean _
)
public VintasoftImage(
System.IO.Stream stream,
bool closeStreamAfterUse
)

Parameters

stream
The stream which contains the image.
closeStreamAfterUse
A value indicating whether the stream must be closed after use.
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 (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: .NET 11; .NET 10; .NET 9; .NET 8; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also