此方法會將目前影像平面的副本,以指定格式儲存為影像檔案。
HRESULT WriteToFile(
BSTR FileName,
ImageFileFormatEnum Format,
IImageModification* Modification,
IUnknown* ExtendedParams
);
void WriteToFile(
string FileName,
ImageFileFormatEnum Format,
IImageModification Modification,
object ExtendedParams
);
Sub WriteToFile( _
FileName As String, _
Format As ImageFileFormatEnum, _
[Modification As IImageModification = Nothing], _
[ExtendedParams As Object = Nothing] _
)
FileName
[in] 此參數包含要儲存影像之影像檔案的完整路徑。範例:C:\MyPictures\MyPic.bmp。若此路徑中已存在檔案,系統將直接覆寫,不會提示。
Format
[in] ImageFileFormatEnum 類型的變數,用於指定輸出檔案的格式。此列舉中定義的格式並非全部都支援寫入。
Modification
[in] 此 ImageModification 類型的參數,用來定義在將影像寫入檔案前要對影像執行的修改。此參數為選用,可為 0;在此情況下,不會對影像執行任何修改。
ExtendedParams
[in] 此變數可參照 JpegExtendedParams、PngExtendedParams 或 TiffExtendedParams 物件,分別定義將影像儲存為 JPEG、PNG 或 TIFF 格式時使用的參數。此參數為選用,可為 0。在此情況下,若為 JPEG,影像會以無損 JPEG 2000 壓縮儲存;若為 PNG,則不使用透明度;若為 TIFF,則使用預設品質。
在 Linux 中,如果您使用的是以 out-of-process 方式載入的 ABBYY FineReader Engine,則此參數必須傳遞 NULL。
此方法沒有特定的傳回值。它會傳回 ABBYY FineReader Engine 函式的標準傳回值。
處理影像
ImageFileFormatEnum
ImageModification