我想通過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實現。 –