VintaSoft Imaging .NET SDK v8.6
Vintasoft.Imaging Namespace / VintasoftImage Class / VintasoftImage Constructor / VintasoftImage Constructor(Image,Boolean)
Image object.
Dispose image when this VintasoftImage is disposed.
Example



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

    Parameters

    image
    Image object.
    disposeImageAfterUse
    Dispose image when this VintasoftImage is disposed.
    Exceptions
    ExceptionDescription
    if image is null.
    Example
    This example shows how to load image from System.Drawing.Image object (bitmap will be disposed automatically when image is disposed).
    Dim filepath As String = "D:\Example.jpg"
    ' create a bitmap
    Dim bitmap As System.Drawing.Image = System.Drawing.Bitmap.FromFile(filepath)
    ' create an image from bitmap (bitmap will be disposed automatically when image is disposed)
            ' ...
    Using image As New Vintasoft.Imaging.VintasoftImage(bitmap, True)
    End Using
    string filepath = @"D:\Example.jpg";
    // create a bitmap
    System.Drawing.Image bitmap = System.Drawing.Bitmap.FromFile(filepath);
    // create an image from bitmap (bitmap will be disposed automatically when image is disposed)
    using (Vintasoft.Imaging.VintasoftImage image = 
        new Vintasoft.Imaging.VintasoftImage(bitmap, 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