ImageEn

WIA item properties


Common WIA Item Property Constants



WIA_IPA_ACCESS_RIGHTS

This flag controls access to the item as well as whether the item is deleted. This property is read only for scanners and read/write for cameras, depending on whether the camera supports changing the access rights

Access Right values:
Property Description
WIA_ITEM_READ Item has read-only access
WIA_ITEM_WRITE Item has write-only access
WIA_ITEM_CAN_BE_DELETED Item has delete-only access
WIA_ITEM_RD Item has read and delete access
WIA_ITEM_RWD Item has read, write, and delete access


WIA_IPA_APP_COLOR_MAPPING

By default, it is the responsibility of the driver to map images from the user-selected profile to SRGB. If an application uses the ICM system to handle color profiles, it sets this property to instruct the driver to stop mapping automatically. The image is then in the color space specified by the WIA_IPA_COLOR_PROFILE property.


WIA_IPA_BITS_PER_CHANNEL

Bits per color channel. 1 for 1 bit per pixel black and white; 8 for 8-bit-per-pixel RGB. This property is read/write for scanners that support different bits-per-pixel settings. Otherwise it is read only.


WIA_IPA_BYTES_PER_LINE

Bytes per line of scan data. Some scanners may pad scan lines with extra bytes to make the scan line a fixed number of DWORDS. This is a read-only property and is set by the device, based on the scan settings.


WIA_IPA_CHANNELS_PER_PIXEL

Number of color channels per pixel. Typical values are 1 for black and white data; 3 for RGB.


WIA_IPA_COLOR_PROFILE

This property specifies the International Color Consortium (ICC) color profile for the images produced by the item.
When the WIA_IPA_APP_COLOR_MAPPING property is set, the current value of this property indicates the color profile for images produced by the WIA item. If the color mapping property is not set, the driver will map images from the current value of this property to sRGB.
This property should not be set by the application or driver. It is managed by WIA based on user input. The valid values setting lists the profiles the user has associated with the device.


WIA_IPA_COMPRESSION

Specifies the compression within the given data format. Useful for data formats like TIFF and DIB that have optional compressed modes.
This property is read/write for devices that support more than one compression type. For all other devices, it is read only.

Compression Types:
Property Description
WIA_COMPRESSION_NONE No compression
WIA_COMPRESSION_BI_RLE4 DIB 4 bit run length encoding
WIA_COMPRESSION_BI_RLE8 DIB 8 bit run length encoding
WIA_COMPRESSION_G3 TIFF CCITT G3
WIA_COMPRESSION_G4 TIFF CCITT G4
WIA_COMPRESSION_JPEG JPEG encoding


WIA_IPA_DATATYPE

This property indicates the image type of the item. This property is read-only for cameras and read/write for scanners.

Data Types:
Property Description
WIA_DATA_THRESHOLD One bit-per-pixel black-and-white threshold. Data over the current value of WIA_IPS_THRESHOLD is converted to white; data under this value is converted to black
WIA_DATA_DITHER Scan data is dithered using the currently selected dither pattern
WIA_DATA_GRAYSCALE Scan data represents intensity. The palette is a fixed, equally-spaced gray scale with a depth specified by WIA_IPA_DEPTH property
WIA_DATA_COLOR Scan data is red, green, blue (RGB) color. The full color format is described using the following WIA properties:
WIA_DATA_COLOR_THRESHOLD Same as WIA_DATA_COLOR except that the threshold value is used when scanning the data. Color values over the WIA_IPS_THRESHOLD value are converted to full brightness; colors under this value are converted to black
WIA_DATA_COLOR_DITHER Same as WIA_DATA_COLOR except that the data is dithered using the currently selected dither pattern

WIA_IPA_CHANNELS_PER_PIXEL
WIA_IPA_BITS_PER_CHANNEL
WIA_IPA_PLANAR
WIA_IPA_PIXELS_PER_LINE
WIA_IPA_BYTES_PER_LINE
WIA_IPA_NUMBER_OF_LINES


WIA_IPA_DEPTH

Requested number of bits per pixel. On devices that allow for multiple color-space resolutions per data type, this property is a list of values (a WIA_PROP_LIST) specifying the color-space resolutions. On devices that allow only a single color-space resolution per data type, this is a read-only property that tracks the WIA_IPA_DATATYPE set above, otherwise it is read/write. This property is always read-only for cameras.


WIA_IPA_FILENAME_EXTENSION

This property specifies the preferred filename extension for a particular file format. The driver updates this property to reflect the current value of the WIA_IPA_FORMAT property.
This property is recommended for drivers that support standard formats. However, it is required for drivers that implement custom-defined formats. It is needed to allow the application to determine the correct filename extension to use during file transfer of private formats.
For example, if WIA_IPA_FORMAT is WiaImgFmt_JPEG, then WIA_IPA_FILENAME_EXTENSION should be "jpg", or if WIA_IPA_FORMAT is WiaImgFmt_BMP, then WIA_IPA_FILENAME_EXTENSION should be "bmp". Notice that the file name extension does not include the ".".


WIA_IPA_FORMAT

This property controls the data format returned to the application.
This property is read/write for devices that support more than one format. Otherwise, it is read only.

Format Types:
Property Description
WiaImgFmt_MEMORYBMP Windows bitmap without a BITMAPFILEHEADER header
WiaImgFmt_BMP Windows bitmap with a BITMAPFILEHEADER header
WiaImgFmt_EMF Extended Windows metafile
WiaImgFmt_WMF Windows metafile
WiaImgFmt_JPEG JPEG compressed format
WiaImgFmt_PNG W3C PNG format
WiaImgFmt_GIF GIF image format
WiaImgFmt_TIFF Tag Image File Format
WiaImgFmt_EXIF Exchangeable File Format
WiaImgFmt_PHOTOCD Eastman Kodak file format
WiaImgFmt_FLASHPIX FlashPix format
WiaImgFmt_ICO Microsoft icon file format
WiaImgFmt_CIFF Camera Image File format
WiaImgFmt_PICT Apple file format
WiaImgFmt_JPEG2K JPEG 2000 compressed format
WiaImgFmt_JPEG2KX JPEG 2000 compressed format
WiaImgFmt_RTF Rich Text File format
WiaImgFmt_XML XML file
WiaImgFmt_TXT Text file
WiaImgFmt_MPG MPG video format
WiaImgFmt_AVI AVI video format
WiaImgFmt_ASF ASF video format
WiaImgFmt_SCRIPT Script file
WiaImgFmt_EXEC Executable file
WiaImgFmt_UNICODE16 UNICODE 16-bit encoding
WiaImgFmt_DPOF DPOF printing format
WiaAudFmt_WAV WAV audio format
WiaAudFmt_MP3 MP3 audio format
WiaAudFmt_AIFF AIFF audio format
WiaAudFmt_WMA WMA audio format
WiaImgFmt_HTML HTML format
WiaImgFmt_RAWRGB Raw RGB format

The valid values for this property match the values returned by drvGetWiaFormatInfo based on the setting of WIA_IPA_TYMED. When WIA_IPA_TYMED is set to TYMED_CALLBACK, the valid values for this property include at least IMGFMT_MEMORYBMP. When WIA_IPA_TYMED is set to TYMED_FILE, the valid values for this property include at least IMGFMT_BMP.
When an application uses WiaImgFmt_RAWRGB, the accuracy of the image transfer depends on the following properties:
 WIA_IPA_DATATYPE
 WIA_IPA_CHANNELS_PER_PIXEL
 WIA_IPA_BITS_PER_CHANNEL
 WIA_IPA_DEPTH
 WIA_IPA_PIXELS_PER_LINE
 WIA_IPA_NUMBER_OF_LINES
 WIA_IPS_XRES
 WIA_IPS_YRES
For WiaImgFmt_RAWRGB valid values for these properties are the following:
WIA_IPA_DATATYPE - set to WIA_DATA_COLOR
WIA_IPA_DEPTH - set to 24 or higher.
The data transferred for RAWRGB should be uncompressed, in RGB byte order, DWORD aligned, and transferred with no image header.
Supporting the WiaImgFmt_RAWRGB format GUID allows TWAIN applications to transfer images higher than 32 bit using the memory transfer method.


WIA_IPA_FULL_ITEM_NAME

Complete item name, that includes hierarchy. This property is supplied by WIA. The full hierarchy includes the Plug and Play device index followed by the root item name, ROOT, followed by the item name. For example, a picture at the highest level in a camera could be named:
0001\Root\Image0001


WIA_IPA_GAMMA_CURVES

Gamma Correction curves for each color channel. Format is TBD. This property is optional.


WIA_IPA_ICM_PROFILE_NAME

The name of the color management device profile for the scanner.


WIA_IPA_ITEM_FLAGS

Flags that specify the item type and accessibility. This property is supplied by WIA. For information about these flags


WIA_IPA_ITEM_NAME

Name of the item object, for example, "\Image0001". This property is supplied by WIA.


WIA_IPA_ITEM_SIZE

Total data transfer size including data and data-specific header information, if the size is known. If the size is not known, this property must be set to zero.


WIA_IPA_MIN_BUFFER_SIZE

This property is used to specify the minimum buffer size used in data transfers. If the data transfer is done via callback, it may be as small as 64K, but if the transfer is to file, then it is the number of bytes needed to transfer a page of data at a time.


WIA_IPA_NUMBER_OF_LINES

Number of lines in the final image. This is a read-only property and is set by the device, based on the scan settings.


WIA_IPA_PIXELS_PER_LINE

Number of pixels per line in the current image. This is a read-only property and is set by the device based on the scan settings.


WIA_IPA_PLANAR

Describes whether the data is returned in a planar or packed-pixel format.


WIA_IPA_PREFERRED_FORMAT

The preferred data format the driver or device supplies to the application.

Format Types:
Property Description
WiaImgFmt_MEMORYBMP Windows bitmap without a header file
WiaImgFmt_BMP Windows bitmap with header file
WiaImgFmt_EMF Extended Windows metafile
WiaImgFmt_WMF Windows metafile
WiaImgFmt_JPEG JPEG compressed format
WiaImgFmt_PNG W3C PNG format
WiaImgFmt_GIF GIF image format
WiaImgFmt_TIFF Tag Image File Format
WiaImgFmt_EXIF Exchangeable File Format
WiaImgFmt_PHOTOCD Eastman Kodak file format
WiaImgFmt_FLASHPIX FlashPix format
WiaImgFmt_ICO Microsoft icon file format


WIA_IPA_PROP_STREAM_COMPAT_ID

This property specifies a CLSID that represents a set of device property values. If a device driver implements this feature, applications use this property to determine if the device supports a set of values. This property is optional.


WIA_IPA_REGION_TYPE

This property is used to specify the type of region the image analysis has created. This property is optional. The following region types are supported:
Property Description
WIA_TEXT_ITEM Region contains text
WIA_PHOTO_ITEM Region contains a photo
WIA_DRAWING_ITEM Region contains a line drawing
WIA_LOGO_ITEM Region contains a logo
WIA_HANDWRITING_ITEM Region contains handwriting
WIA_CHART_ITEM Region contains a chart or graph
WIA_TABLE_ITEM Region contains tabular data


WIA_IPA_SUPPRESS_PROPERTY_PAGE

Specifies whether to suppress the property pages for items on this device. This property takes one of the following constant values:
Property Description
WIA_PROPPAGE_CAMERA_ITEM_GENERAL Suppress the general item property page for a camera
WIA_PROPPAGE_SCANNER_ITEM_GENERAL Suppress the general item property page for a scanner


WIA_IPA_TYMED

Specifies data transfer type:
Property Description
WIA_TYMED_CALLBACK Use callback based data transfer
WIA_TYMED_MULTIPAGE_CALLBACK Use callback based data transfer for multi-page or finished file scans
WIA_TYMED_FILE Use file based data transfer
WIA_TYMED_MULTIPAGE_FILE Use file based data transfer for multi-page or finished file scans




Scanner WIA Item Property Constants




WIA_IPS_BRIGHTNESS

The image brightness values available within the scanner.
It is up to the scanner driver to supply a range of valid values for this property. Applications query the device for the valid values. Smaller values make the image darker. Larger values make the image brighter. This property is mandatory for all scanners.


WIA_IPS_CONTRAST

The image contrast values available within the scanner. It is up to the scanner driver to supply a range of valid values for this property. Applications query the device for the valid values. Smaller values make the image darker. Larger values make the image brighter. This property is mandatory for all scanners.


WIA_IPS_CUR_INTENT

Allows a driver to preset item properties based on the intended use of the image of an application. To provide an intent, use an intended image type flag and an intended size/quality flag OR'd together. Note that an image cannot be both grayscale and color. This property is mandatory for all scanners.

Intended image type flags:
Property Description
WIA_INTENT_NONE Default value. Do not preset any properties
WIA_INTENT_IMAGE_TYPE_COLOR Preset properties for color content
WIA_INTENT_IMAGE_TYPE_GRAYSCALE Preset properties for grayscale content
WIA_INTENT_IMAGE_TYPE_TEXT Preset properties for text content
WIA_INTENT_IMAGE_TYPE_MASK Mask for all of the image type flags

Intended image size/quality flags:
Property Description
WIA_INTENT_MINIMIZE_SIZE Preset properties to minimize image size
WIA_INTENT_MAXIMIZE_QUALITY Preset properties to maximize image quality
WIA_INTENT_SIZE_MASK Mask for all of the size/quality flags


WIA_IPS_INVERT

Specifies a photo-negative scan. This property is optional.


WIA_IPS_MIRROR

If a scanner supports the detection of document mirroring, this property is implemented with read-only access. If a scanner supports mirroring during scanning, this property is implemented with read/write access. The mirroring flags include the following:
Property Description
WIA_MIRRORED The image data is in mirrored orientation, or requests the device to mirror-invert the image


WIA_IPS_ORIENTATION

If a scanner can support the detection of document orientation, this property is implemented. The orientation flags include the following:
Property Description
WIA_PORTRAIT The image data is in portrait orientation(0 degrees rotation)
WIA_LANDSCAPE The image data is in landscape orientation (the page is rotated 90 degrees counter-clockwise)
WIA_ROT180 The image data is in an upside-down orientation (180 degrees rotation)
WIA_ROT270 The image data is in an upside-down landscape orientation (the page is rotated 270 degrees counter-clockwise)


WIA_IPS_PHOTOMETRIC_INTERP

Photometric interpretation. The default color interpretation of image data.
WIA_PHOTO_WHITE_1 : white is 1, black is 0.
WIA_PHOTO_WHITE_0 : white is 0, black is 1.
For devices or drivers that support selectable photometric interpretation, the access for this property is read/write. For all others, it is read only. This property is mandatory for all scanners.


WIA_IPS_ROTATION

If a scanner supports internal rotation during scanning, this property is implemented. The rotation flags include the following:
Property Description
WIA_PORTRAIT The driver or device will not rotate the image (0 degrees counter-clockwise)
WIA_LANDSCAPE The driver or device rotates the image 90 degrees counter-clockwise
WIA_ROT180 The driver or device rotates the image 180 degrees counter-clockwise
WIA_ROT270 The driver or device rotates the image 270 degrees counter-clockwise


WIA_IPS_THRESHOLD

Specifies the dividing line between black and white. This is the value the scanner uses to threshold, when the WIA_IPA_DATATYPE property is set to WIA_DATA_THRESHOLD. Higher positive values represent lighter pixel values.
The device driver specifies a range of valid values for this property. Applications query the device for the range of valid values. This property is optional.


WIA_IPS_WARM_UP_TIME

Indicates to the application how long, in milliseconds, it takes the scanner and/or lamp to warm up before scanning commences. The application displays a progress indicator to the user based on this value. If the device requires no warm-up, the value should be zero. This property is optional.


WIA_IPS_XEXTENT - Horizontal Extent

The width of the scan in pixels. This property is mandatory for all scanners.


WIA_IPS_XPOS - Horizontal Start Position

The horizontal start position in pixels of the image to be scanned. This property is mandatory for all scanners.


WIA_IPS_XRES - Horizontal Resolution

Specifies the current horizontal (X) axis resolution, in dots per inch (DPI). For scanners that do not support the independent setting of horizontal and vertical resolutions, the vertical resolution tracks the Horizontal Resolution property. To find out if the scanner supports independent resolutions, query the Vertical Resolution property.
The following properties are dependent on the Horizontal Resolution property for the independent resolution case:
 Horizontal Start Position
 Horizontal Extent
 Pixels per Line
 Bytes Per Line
 File Size

In addition, the following properties are also reliant in the dependent resolution case:
 Vertical Start Position
 Vertical Extent
 Number of Lines

This property is either a range or a list. This property is mandatory for all scanners.


WIA_IPS_YEXTENT - Vertical Extent

The height of the scan in lines. This property is mandatory for all scanners.


WIA_IPS_YPOS - Vertical Start Position

The vertical start position in pixels of the image to be scanned. This property is mandatory for all scanners.


WIA_IPS_YRES - Vertical Resolution

For scanners that support the independent setting of horizontal and vertical resolution, this property specifies the current vertical (Y) axis resolution, in DPI. It is implemented as read/write. For scanners that do not support independent setting of horizontal and vertical resolutions, this property is implemented as read-only and tracks the WIA_IPS_XRES property. This property is mandatory for all scanners.
The following properties are dependent on the Vertical Resolution property:
 Vertical Start Position
 Vertical Extent
 Number of Lines
 File Size




Camera WIA Item Property Constants




WIA_IPC_AUDIO_AVAILABLE

The camera item has audio data available.


WIA_IPC_AUDIO_DATA

Camera Audio data.


WIA_IPC_AUDIO_DATA_FORMAT

Audio formats for WIA are TBD.


WIA_IPC_NUM_PICT_PER_ROW

The number of pictures in a horizontal row for this camera.


WIA_IPC_SEQUENCE

Indicates the relative temporal position of this image in a multi-image time sequence. The numbers are not required to be sequential or start at any particular value. The values increase with time.


WIA_IPC_THUMB_HEIGHT

Specifies the height of the thumbnail in pixels.


WIA_IPC_THUMB_WIDTH

Specifies the width of the thumbnail in pixels.


WIA_IPC_THUMBNAIL

The thumbnail data. This is a fixed format consisting of raw, 24 bit, DWORD aligned, Blue-Green-Red color order, DIB bits with no DIB header.


WIA_IPC_TIMEDELAY

Indicates the amount of time, in milliseconds, that transpired between the capture of the current image and the previous image.