WebImage.Save(String, String, Boolean) Method

Definition

Saves the image using the specified file name.

public System.Web.Helpers.WebImage Save (string filePath = default, string imageFormat = default, bool forceCorrectExtension = true);
member this.Save : string * string * bool -> System.Web.Helpers.WebImage
Public Function Save (Optional filePath As String = null, Optional imageFormat As String = null, Optional forceCorrectExtension As Boolean = true) As WebImage

Parameters

filePath
String

The path to save the image to.

imageFormat
String

The format to use when the image file is saved, such as "gif", or "png".

forceCorrectExtension
Boolean

true to force the correct file-name extension to be used for the format that is specified in imageFormat; otherwise, false. If there is a mismatch between the file type and the specified file-name extension, and if forceCorrectExtension is true, the correct extension will be appended to the file name. For example, a PNG file named Photograph.txt is saved using the name Photograph.txt.png.

Returns

The image.

Applies to