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
url
stringPath or url to file with image data.
bitmapType
BitmapTypeType 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.
index
intSee description in GenericImage(string?, BitmapType, int)
Returns
- bool
true
if the call succeeded,false
otherwise.
LoadFromFile(string?, string, int)
Loads an image from a file.
public virtual bool LoadFromFile(string? url, string mimetype, int index = -1)
Parameters
url
stringPath or url to file with image data.
mimetype
stringMIME type string (for example 'image/jpeg').
index
intSee description in GenericImage(string?, BitmapType, int)
Returns
- bool
true
if the call succeeded,false
otherwise.