The following constants are used for the DTWAIN_AcquireFile and DTWAIN_AcquireFileEx functions.
These constants describe the various image file types that DTWAIN can save acquired images to using the DTWAIN file transfer support. Any Twain Source, regardless of make or model of the device, can acquire to the file types below. To use the constants defined below, the DTWAIN_USESOURCEMODE flag must not be set when you specify the file control flags in the call to DTWAIN_AcquireFile or DTWAIN_AcquireFileEx. Note: These constants are not to be used if using the Source's internal file transfer support (see Source Internal File Support below for the proper constants to use for DTWAIN_EnumFileXferFormats).
File Type
|
Value
|
Description
|
|
|
|
DTWAIN_BMP
|
100
|
Windows Bitmap (BMP format)
|
DTWAIN_ICO
|
8000
|
Windows ICON file (width/height <= 255 pixels)
|
DTWAIN_ICO_VISTA
|
8001
|
Vista Windows ICON file (width/height > 255 pixels)
|
DTWAIN_JPEG
|
200
|
JPEG (JFIF) Format
|
DTWAIN_PCX
|
300
|
Microsoft Paintbrush (PCX format)
|
*DTWAIN_DCX
|
301
|
Multi-page PCX file
|
DTWAIN_TGA
|
400
|
Targa (TGA format)
|
DTWAIN_TIFFLZW
|
500
|
TIFF Using LZW compression
|
DTWAIN_TIFFNONE
|
600
|
Uncompressed TIFF
|
DTWAIN_TIFFG3
|
700
|
TIFF Using Group 3 Encoding (CCITT Group 3 Fax)
|
DTWAIN_TIFFG4
|
800
|
TIFF Using Group 4 Encoding (CCITT Group 4 Fax)
|
DTWAIN_TIFFPACKBITS
|
801
|
TIFF PACKBITS (Mac RLE Encoding)
|
DTWAIN_TIFFDEFLATE
|
802
|
TIFF Using zlib Deflate compression
|
DTWAIN_TIFFJPEG
|
803
|
TIFF Using JPEG compression
|
*DTWAIN_TIFFNONEMULTI
|
900
|
Multi-page uncompressed TIFF
|
*DTWAIN_TIFFG3MULTI
|
901
|
Multi-page TIFF Using Group 3 Encoding (CCITT Group 3 Fax)
|
*DTWAIN_TIFFG4MULTI
|
902
|
Multi-page TIFF Using Group 4 Encoding (CCITT Group 4 Fax)
|
*DTWAIN_TIFFPACKBITSMULTI
|
903
|
Multi-page TIFF PACKBITS (Mac RLE Encoding)
|
*DTWAIN_TIFFDEFLATEMULTI
|
904
|
Multi-page TIFF Using zlib Deflate compression
|
*DTWAIN_TIFFJPEGMULTI
|
905
|
Multi-page TIFF Using JPEG compression
|
*DTWAIN_TIFFLZWMULTI
|
906
|
Multi-page TIFF Using LZW compression
|
DTWAIN_WMF
|
850
|
Windows Metafile (WMF) (32.bit DLL only)
|
DTWAIN_EMF
|
851
|
Windows Enhanced Metafile (EMF) (32 bit only)
|
DTWAIN_GIF
|
950
|
GIF Format
|
DTWAIN_PNG
|
1000
|
Portable Network Graphics (PNG)
|
DTWAIN_PSD
|
2000
|
Adobe Photoshop (PSD) (32 bit DLL only)
|
DTWAIN_PDF
|
250
|
Adobe Portable Document Format (PDF)**
|
*DTWAIN_PDFMULTI
|
251
|
Multi-page PDF file**
|
DTWAIN_JPEG2000
|
3000
|
JPEG-2000 Format
|
DTWAIN_POSTSCRIPT1
|
4000
|
Adobe PostScript Level 1**
|
DTWAIN_POSTSCRIPT2
|
4001
|
Adobe PostScript Level 2**
|
DTWAIN_POSTSCRIPT3
|
4002
|
Adobe PostScript Level 3**
|
*DTWAIN_POSTSCRIPT1MULTI
|
4003
|
Multi-page PostScript Level 1**
|
*DTWAIN_POSTSCRIPT2MULTI
|
4004
|
Multi-page PostScript Level 2**
|
*DTWAIN_POSTSCRIPT3MULTI
|
4005
|
Multi-page PostScript Level 3**
|
DTWAIN_TEXT
|
6000
|
Text file***
|
DTWAIN_TEXTMULTI
|
6001
|
Multi-page Text file***
|
DTWAIN_WBMP
|
8500
|
Wireless Bitmap (width/height limited to 255 pixels)
|
* The multi-page file types are supported only for Twain devices that can acquire multiple pages (for example, a scanner equipped with an automatic document feeder) or if the DTWAIN_SetMultipageScanMode has been set with DTWAIN_FILESAVE_UICLOSE or DTWAIN_FILESAVE_SOURCECLOSE option. Otherwise, the multi-page file types revert to their single-page equivalent.
** PDF and PostScript option is available only with DTWAIN / PDF support.
*** Text file support is only available if one of the supported OCR engines is installed.
Source Internal File Support
These constants describe the image file types that a Source can save an acquired image to if the Source's internal file transfer support is used. These constants are to be used only for the internal file transfer that the Source provides. Note that not all Sources have File transfer support. If the Twain Source does not support file transfers, you must use one of the constants defined above!.
When calling DTWAIN_AcquireFile or DTWAIN_AcquireFileEx and specifying the DTWAIN_USESOURCEMODE flag, the Source is responsible for the file transfer, and DTWAIN provides no other support except to initiate the transfer. Problems with improper files being generated, incorrect bitmaps, etc. are not the responsibility of DTWAIN when specifying DTWAIN_USESOURCEMODE.
These constants are returned by the DTWAIN_EnumFileXferFormats and are to be used when acquiring an image using the Source's internal file transfer.
DTWAIN Constant
|
Value
|
Description
|
|
|
|
DTWAIN_FF_TIFF
|
0
|
TIFF Format
|
DTWAIN_FF_PICT
|
1
|
Macintosh PICT format
|
DTWAIN_FF_BMP
|
2
|
Windows BMP Format
|
DTWAIN_FF_XBM
|
3
|
X Bitmap Format
|
DTWAIN_FF_JFIF
|
4
|
JFIF (JPEG) Format
|
DTWAIN_FF_FPX
|
5
|
Flash Pix Format
|
DTWAIN_FF_TIFFMULTI
|
6
|
Multi-Page TIFF
|
DTWAIN_FF_PNG
|
7
|
PNG Format
|
DTWAIN_FF_SPIFF
|
8
|
SPIFF format
|
DTWAIN_FF_EXIF
|
9
|
EXIF format
|
|