VintaSoft Imaging .NET SDK 12.3: Documentation for .NET developer
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructors / VintasoftImage Constructor(String,Boolean)
Syntax Remarks Example Requirements SeeAlso
In This Topic
    VintasoftImage Constructor(String,Boolean)
    In This Topic
    Initializes a new instance of the VintasoftImage class.
    Syntax
    'Declaration
    
    Public Function New( _
    ByVal filename
    The name of the image file.
    As System.String, _
    ByVal readOnlyMode
    A value indicating whether the file should be opened in readonly mode.
    As Boolean _
    )
    public VintasoftImage(
    System.String filename,
    bool readOnlyMode
    )
    public: VintasoftImage(
    System.String filename,
    bool readOnlyMode
    )
    public:
    VintasoftImage(
    System.String filename,
    bool readOnlyMode
    )

    Parameters

    filename
    The name of the image file.
    readOnlyMode
    A value indicating whether the file should be opened in readonly mode.
    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 file (file will be opened in read only mode, file stream will be closed when image is disposed).

    
    Dim filepath As String = "D:\Example.tiff"
    ' create an image from file (file will be opened in read only mode,
    ' file stream will be closed when image is disposed)
            ' ...
    Using image As New Vintasoft.Imaging.VintasoftImage(filepath, True)
    End Using
    
    
    
    string filepath = @"D:\Example.tiff";
    // create an image from file (file will be opened in read only mode,
    // file stream will be closed when image is disposed)
    using (Vintasoft.Imaging.VintasoftImage image = 
        new Vintasoft.Imaging.VintasoftImage(filepath, true))
    {
        // ...
    }
    
    

    Requirements

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

    See Also