此接口已在适用于 Linux 和 Windows 的 FRE 中实现。
方法
| 名称 | 描述 |
|---|---|
| GetNextImageDocument | 返回源图像处理队列中的下一个图像文档。 |
| GetNextImageFile | 返回源图像处理队列中的下一个图像文件。 |
| IsEmpty | 检查源图像处理队列中是否包含任何图像文件。 |
输入参数
示例
C# 代码
C# 代码
| 名称 | 描述 |
|---|---|
| GetNextImageDocument | 返回源图像处理队列中的下一个图像文档。 |
| GetNextImageFile | 返回源图像处理队列中的下一个图像文件。 |
| IsEmpty | 检查源图像处理队列中是否包含任何图像文件。 |
C# 代码
// 自定义图像源的示例实现,用于维护图像文件队列
public class ImageSourceCallback : FREngine.IImageSource
{
public ImageSourceCallback( string imageFilesDirectory )
{
imageFiles = ImageSourceHelper.LoadFilesNames( imageFilesDirectory );
nextFileIndex = 0;
}
public bool IsEmpty()
{
return nextFileIndex >= imageFiles.Length;
}
public FREngine.IFileAdapter GetNextImageFile()
{
if( !IsEmpty() ) {
return new FileAdapterCallback( imageFiles[nextFileIndex++] );
}
return null;
}
public FREngine.IImageDocument GetNextImageDocument()
{
...
}
private string[] imageFiles;
private int nextFileIndex;
}
public class FileAdapterCallback : FREngine.IFileAdapter
{
...
}
public class ImageSourceHelper
{
...
}
此页面对您有帮助吗?