Table of Contents

Method SaveToFile

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

SaveToFile(string, BitmapType)

Saves an image in the named file.

public virtual bool SaveToFile(string filename, BitmapType bitmapType)

Parameters

filename string

Path to file.

bitmapType BitmapType

Type 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.

Returns

bool

true if the call succeeded, false otherwise.

SaveToFile(string, string)

Saves an image in the named file.

public virtual bool SaveToFile(string filename, string mimetype)

Parameters

filename string

Name of the file to save the image to.

mimetype string

MIME type string (for example 'image/jpeg').

Returns

bool

true if the call succeeded, false otherwise.

SaveToFile(string)

Saves an image in the named file.

public virtual bool SaveToFile(string filename)

Parameters

filename string

Path to file.

Returns

bool

true if the call succeeded, false otherwise.

Remarks

File type is determined from the extension of the file name. Note that this function may fail if the extension is not recognized! You can use one of the overload methods to save images to files with non-standard extensions.