此方法会将当前图像平面的副本按指定格式保存为图像文件。
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 中,如果你使用的是以进程外方式加载的 ABBYY FineReader Engine,你必须为此参数传递 NULL。
此方法没有特定的返回值。它会返回 ABBYY FineReader Engine 函数的标准返回值。
处理图像
ImageFileFormatEnum
ImageModification