Share via


WebImage.Save Method

Saves the image using the specified file name.

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

Syntax

'Declaration
Public Function Save ( _
    filePath As String, _
    imageFormat As String, _
    forceCorrectExtension As Boolean _
) As WebImage
'Usage
Dim instance As WebImage 
Dim filePath As String 
Dim imageFormat As String 
Dim forceCorrectExtension As Boolean 
Dim returnValue As WebImage 

returnValue = instance.Save(filePath, _
    imageFormat, forceCorrectExtension)
public WebImage Save(
    string filePath,
    string imageFormat,
    bool forceCorrectExtension
)
public:
WebImage^ Save(
    String^ filePath, 
    String^ imageFormat, 
    bool forceCorrectExtension
)
member Save : 
        filePath:string * 
        imageFormat:string * 
        forceCorrectExtension:bool -> WebImage
public function Save(
    filePath : String, 
    imageFormat : String, 
    forceCorrectExtension : boolean
) : WebImage

Parameters

  • imageFormat
    Type: System.String
    The format to use when the image file is saved, such as "gif", or "png".
  • forceCorrectExtension
    Type: System.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.

Return Value

Type: System.Web.Helpers.WebImage
The image.

See Also

Reference

WebImage Class

System.Web.Helpers Namespace