[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.Image.FromFile

FromFile Method

FromFile(string, ImageBinding, int)

Creates an Image from a file. JPEG, PNG, WEBP, GIF, BMP and TIFF formats are supported.

Declaration
public static Image FromFile(string path, ImageBinding binding = ImageBinding.FilePath, int frameIndex = 0)
Public Shared Function FromFile(path As String, Optional binding As ImageBinding = ImageBinding.FilePath, Optional frameIndex As Integer = 0) As Image
Parameters
Type Name Description
string path

The file path to the image.

ImageBinding binding

Specifies how the image data is attached to the Image object.

int frameIndex

Index of an image frame to read, pass 0 for image formats not supporting multiple frames.

Returns
Type Description
Image

The newly created Image object.