此方法会创建一个 MultipageImageWriter 对象,可用于将多个图像保存到单个多页图像文件中,并支持扩展的图像保存参数。
HRESULT CreateMultipageImageWriter(
BSTR FileName,
ImageFileFormatEnum FileFormat,
IUnknown* ExtendedParams,
IMultipageImageWriter** Result
);
IMultipageImageWriter CreateMultipageImageWriter(
string FileName,
IImageFileFormatEnum FileFormat,
object ExtendedParams
);
Function CreateMultipageImageWriter( _
FileName As String, _
FileFormat As IImageFileFormatEnum, _
ExtendedParams As Object _
) As IMultipageImageWriter
FileName
[in] 此参数包含将保存图像的多页图像文件的完整路径。例如,C:\MyPic.tif、/opt/MyPic.tif、/Users/user/Pictures/MyPic.tif。如果已存在同名文件,将直接覆盖且不会提示。
FileFormat
[in] 一个 ImageFileFormatEnum 类型的变量,用于指定输出文件的格式。此枚举中定义的格式并非全部都支持写入。
ExtendedParams
[in] 此变量引用 JpegExtendedParams 或 TiffExtendedParams 对象,分别定义将图像保存为 JPEG 或 TIFF 格式时使用的参数。此参数为可选,可以为 NULL。
在 Linux 中,如果你使用的是以进程外方式加载的 ABBYY FineReader Engine,你必须为此参数传递 NULL。
Result
[out, retval] 指向 IMultipageImageWriter* 指针变量的指针,用于接收 MultipageImageWriter 输出对象的接口指针。此对象允许将图像追加到多页图像文件末尾。
该方法没有特定的返回值。它返回 ABBYY FineReader Engine 函数的标准返回值。
请注意,并非所有可写入的格式都支持多页图像。因此,您可以为单页格式创建 MultipageImageWriter 对象,但生成的文件中最多只能添加一个页面。
Engine
MultipageImageWriter