WebImage.Save(String, String, Boolean) 方法

定義

使用指定的檔案名稱儲存影像。

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

參數

filePath
String

在其中儲存影像的路徑。

imageFormat
String

要在儲存影像檔時使用的格式 (如 "gif" 或 "png")。

forceCorrectExtension
Boolean

true 表示強制將正確的副檔名用於 中指定的 imageFormat 格式;否則為 false。 如果檔案類型與指定的副檔名不符,如果 forceCorrectExtension 為 true,則會將正確的副檔名附加至檔案名。 例如,使用名稱 Photograph.txt.png,來儲存名為 Photograph.txt 的 PNG 檔案。

傳回

映像。

適用於