我想通过TWAIN界面获取扫描仪支持的文件格式。有一个example如何获得支持格式:如何检查扫描仪支持的图像格式?
GetCapability(ICAP_IMAGEFILEFORMAT, unTest);
CString strType;
strType.Format("Type Supported %d\n", unTest);
但我想有什么错在这里,因为ICAP_IMAGEFILEFORMAT成员不是一个位掩码:
#define TWFF_TIFF 0 /* Tagged Image File Format */
#define TWFF_PICT 1 /* Macintosh PICT */
#define TWFF_BMP 2 /* Windows Bitmap */
#define TWFF_XBM 3
#define TWFF_JFIF 4 /* JPEG File Interchange Format */
#define TWFF_FPX 5 /* Flash Pix */
...
所以,如果扫描仪支持TIFF,PICT,BMP & JFIF在一次通话中不可能返回这样的信息。
如何获取扫描仪支持的格式列表?
是的,你说得对。为了返回枚举值,我不得不深入GetCapability实现。 –