Method LoadFromFile
LoadFromFile(string?, BitmapType, int)
Loads an image from a file.
public virtual bool LoadFromFile(string? url, BitmapType bitmapType = BitmapType.Any, int index = -1)
Parameters
urlstringPath or url to file with image data.
bitmapTypeBitmapTypeType of the bitmap. Depending on how library and OS has been configured and by which handlers have been loaded, not all formats may be available. If value is Any, function will try to autodetect the format.
indexintSee description in GenericImage(string?, BitmapType, int)
Returns
- bool
trueif the call succeeded,falseotherwise.
LoadFromFile(string?, string, int)
Loads an image from a file.
public virtual bool LoadFromFile(string? url, string mimeType, int index = -1)
Parameters
urlstringPath or url to file with image data.
mimeTypestringMIME type string (for example 'image/jpeg').
indexintSee description in GenericImage(string?, BitmapType, int)
Returns
- bool
trueif the call succeeded,falseotherwise.