WebImage.Save(String, String, Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定文件名保存图像。
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 进行保存。
返回
映像。