Skip to main content

Still Image Connectivity for Windows

Updated: December 4, 2001


Windows Image Acquisition (WIA) is the preferred driver model for still image connectivity for Microsoft Windows Millennium Edition (Windows Me) and Windows XP. However, both operating systems support several methods to connect still image devices. This article discusses the options still-image device manufacturers can choose among to achieve connectivity with Windows Me and Windows XP.

Reference information and resources are provided at the end of this article.

On This Page

Introduction  Introduction
Windows Image Acquisition  Windows Image Acquisition
Picture Transfer Protocol  Picture Transfer Protocol
WIA Microdriver  WIA Microdriver
USB Mass Storage  USB Mass Storage
Summary for Still Image Connectivity and Windows  Summary for Still Image Connectivity and Windows
Call to Action for Still Image Connectivity and Windows  Call to Action for Still Image Connectivity and Windows
Glossary  Glossary


Introduction

For device manufacturers, introducing a consumer product means supporting several versions of consumer-based operating systems, including Windows 98 Second Edition and Windows Me. For continuing success, it also means that devices should migrate well to Windows XP. Microsoft recognizes that device manufacturers must balance between providing maximum compatibility with current operating systems and being able to take advantage of features and capabilities that will be offered in future operating systems.

A device manufacturer should choose a particular driver model based on how well it suits the intended device and on how much it provides desired innovation opportunities when the device is connected to the PC. For Microsoft, future innovation will provide new ways for the operating system to interoperate with devices. One possible example would be the ability to program stored values from the PC so that the device can replicate those values on each image or media file generated by the device. The WIA driver model allows such functionality for imaging devices.

Metadata is a foundational element in making the resulting image more valuable to the end user. However, end users do not want to enter metadata themselves. Therefore, the imaging device must generate most of the metadata. The PC can assist in this process when the device allows the PC to provide mechanisms for automatically setting and getting device metadata. For example, it could support using the PC to update the stored camera date or the photographers name.

Additionally, through WIA, software applications can add device-specific configuration and device control capabilities by reading exposed properties. For example, an application could provide a user interface (UI) for setting compression and F-stop levels. Another example would be a vertical software application designed to take advantage of a camera tethered to a PC; it could provide the UI needed to create an ID badge on the computer and taking a picture with the camera via software controls.

Imaging device manufacturers have the opportunity to maximize the consumer imaging experience for Windows Me and Windows XP by adopting the Microsoft WIA driver model. WIA is the preferred driver model for still image connectivity for Windows Me and Windows XP.

As a still image device manufacturer, you should understand that there are several ways to achieve connectivity in Windows, not only through WIA, but also through Microsoft-provided class drivers. The following options are outlined in this article:

  • Writing a complete WIA driver that exposes all proprietary features of the device so that applications can take advantage of those features

  • Using Microsoft tools and drivers that will reduce proprietary driver development requirements, such as Picture Transfer Protocol (PTP) or the WIA microdriver for flatbed scanners

  • Representing a still image device as bulk storage device using the Windows USB Mass Storage class driver

These options, and the related tradeoffs for choosing a particular option, are explored in this article.

Notes:

  • Microsoft does not recommend legacy methods such as a TWAIN datasource for devices designed to use future Windows imaging functionality. This article does not discuss STI/TWAIN datasource connectivity.

  • In this article, connectivity is defined as a driver model rather than as a media transport. However, note that a particular firmware implementation may work only on a particular media transport.

Windows Image Acquisition

WIA is both a DDI and an API for still image devices, first introduced in Windows Me and included in Windows XP. WIA will serve as the foundation for still image device support in future Microsoft operating system releases.

The WIA driver model is built to address the unique needs of imaging devices, such as digital cameras and scanners:

  • Still Image Architecture (STI) was first introduced in Windows 2000. STI provides basic read access, write access, device status, and event detection for still image devices. STI provides these capabilities while allowing the vendor to ship a TWAIN datasource (or components for proprietary APIs) for image processing functions and for application compatibility.

  • WIA extends STI to address image-specific device functionality through the WIA device driver interface (DDI) and an API for exposing imaging hardware capabilities to software applications.

An IHV should write a WIA device driver when they want to innovate on the PC-device connection or expose unique device features to the user through applications and utilities. A WIA driver can expose vendor-specific features to provide the user with unique experiences when the device is interoperating with the PC. Such features could include manipulation of images stored in proprietary formats, specialized device operations such as "self test" or "zoom," and so on.

Many camera and scanner IHVs may supply features on their devices that are not accessible through the default WIA UIs. In order to accommodate UI for non-standard features and for specialized devices and user groups, WIA provides an UI extension capability. This capability allows IHVs to extend the context menu, property sheet, web view, and image application dialog of the system-supplied UI. Scanner IHVs would use a WIA driver to expose unique device capabilities such as an Automatic Document Feeder or to allow scans at high resolutions.

A WIA driver provides these advantages with Windows Me:

  • Scanner and Camera Wizard only recognizes WIA devices

  • Devices are identified automatically in Windows Explorer as imaging devices with associated icons and are exposed in Windows common dialogs

  • Multiple applications can access the device on the local system

  • Application scripting capabilities are provided through the WIA API

  • The driver functions out of process, ensuring greater system stability

  • The driver handles Region of Interest (ROI) processing needs

  • The implementation is compatible with TWAIN 1.7 applications

  • Device properties, such as date and time, can be set through custom applications

Windows XP provides these additional enhancements for devices that use WIA drivers:

  • Automatic document feeder support in Scanner and Camera Wizard

  • Multi-page TIFF generation for Automatic Document Feeder (ADF) scanners

  • Support for scroll-fed scanners without preview capabilities

Still image devices must use a WIA minidriver to be eligible for the "Designed for Windows" logo for Windows Me. This includes scanner functionality on a multifunction device. However, WIA minidrivers are not required for digital still cameras if the device supports the Picture Transfer Protocol (PTP), described later in this article. For Windows XP, a digital camera can either support WIA, PTP, or USB Mass Storage class requirements to be eligible for the "Designed for Windows" logo.

Microsoft does not plan to provide backward compatibility for WIA to Windows 95/98 or Windows 2000.

Picture Transfer Protocol

WIA is an extensive driver model that can be used to expose many imaging-specific hardware capabilities, but there are ways to use the power of WIA without having to write complete WIA drivers.

PTP is a recently-ratified control protocol for digital cameras, resulting from the efforts of the Photographic Imaging Manufacturers Association (PIMA) to create a new standard for simplifying digital photography. PTP enables digital cameras to talk to computers, printers, and other devices using a common control language.

The PTP standard is transport independent, so it can operate over many different physical media, including USB, IEEE 1394, and IrDA interfaces, as well as new Radio Frequency (RF) interfaces such as Bluetooth wireless technology. The first complete PTP specification is based on USB.

A device manufacturer would choose to support PTP when they want a reduced software development effort, but still want Windows connectivity and basic camera-specific device functionality when tethered to the PC, such as allowing the user to take a picture. An additional advantage of PTP is that it provides built-in object tree support, which allows files to be grouped for concurrent transfer to the PC, such as grouping still image files with audio files. PTP is a good choice for digital cameras that have multimedia capabilities.

Microsoft provides a WIA PTP driver in both Windows Me and in Windows XP. Cameras that support PTP in firmware can use the Windows WIA PTP driver. Because this is a standards-based driver, the PTP drivers functionality is constrained to those functions supported in the standard. Any camera that implements PTP in firmware should work with the built-in Windows PTP driver, requiring the manufacturer to supply only a device-specific INF file.

With PTP-enabled Windows and a PTP-enabled camera, users can connect their digital camera, then quickly view and use the images on their PCwithout having to install driver software. PTP supports common device controls, such as taking a picture, so that the user could take advantage of the PC/camera combination in new and different waysagain, without requiring additional software.

With a PTP-enabled camera, the Windows Me PTP driver provides the following advantages:

  • Supports most mandatory commands in the PTP standard.

  • Provides device recognition to the Scanner and Camera Wizard

  • Identifies the device automatically in Windows Explorer as an imaging device, with associated icons, and is exposed in Windows common dialogs

  • Allows multiple applications to access the device on the local system

  • Allows application scripting capabilities as provided through the WIA API

  • Functions out of process, ensuring greater system stability

  • Is compatible with TWAIN 1.7 applications

Windows XP provides these additional enhancements for devices using PTP:

  • Supports all mandatory and optional commands of the PTP standard

  • Provides object-tree support for concurrent transfer of files associated with the primary image file, such as audio or video

For more information about PTP, see http://www.i3a.org/technologies/digitalimaging/ptp/  This link leaves the Microsoft.com site.

WIA Microdriver

The WIA microdriver is a small, hardware-specific helper DLL that translates basic read/writes to a language understood by a flatbed scanner. A WIA minidriver is created when the vendor-provided microdriver is combined with the Microsoft-provided WIA flatbed driver.

A device manufacturer would choose to use the helper DLL when they want to achieve basic scanner connectivity and functionality with the minimum amount of effort. To expose advanced features and higher resolutions, a scanner manufacturer would need to write a WIA minidriver as explained earlier in this article.

The WIA flatbed driver addresses the driver needs of most consumer color flatbed scanners. It also meets the requirements for scanners under the Windows Logo Program for hardware. The WIA flatbed driver supports the following functionality:

  • Common data types, including 1-bit black/white, 8-bit grayscale, and 24-bit color

  • Bitmap (BMP) file type

  • Callback, file transfer, and resolution transfer mechanisms

  • DPI resolutions of 75, 100, 150, 200, 300, and 600

  • Simple ADF control

  • Transparency support

Scanner manufacturers who want to implement basic device support and qualify for the "Designed for Windows" logo should consider using the WIA microdriver as described in the Windows DDK.

USB Mass Storage

It is increasingly common that users will see digital cameras represented as hard disk drives in their PC hardware configuration. Some device manufacturers use this driver model because it works with several operating systems with little investment at the driver level.

A device manufacturer would choose to implement this option when they want simple device connectivity without camera-specific functionality when the device is tethered to the PC. Under Windows Me, most Microsoft imaging features are not available to devices represented as mass storage devices. Because the operating system sees the device as a removable drive, the user cannot acquire images by way of the Scanner and Camera Wizard or via an applications Acquire option, which is typically used for TWAIN or WIA devices.

To access the camera memory from Windows Me, the user must use Windows Explorer or the File Open dialogs to navigate to the cameras stored images. Vendors often provide utilities in the Windows shell to mask the complexity of this task. However, these utilities often cause problems during upgrades, particularly for Windows XP, where the operating system provides much of this functionality. Microsoft does not recommend shipping such utilities unless the vendor plans to ensure seamless upgrades to all future versions of the Windows operating system.

Windows XP will provide basic image acquisition capabilities to cameras that are represented as mass storage devices and that comply with the USB mass storage device requirements. In Windows XP, the Scanner and Camera Wizard can acquire images from devices that meet the USB Mass Storage Class (MSC) requirements on device connection events. However, the camera must advertise a compatible ID as described in this article.

To identify a camera as a camera, not as a storage device, Windows XP requires that the camera must be identified in one of the following two ways:

1. The camera must be listed as an imaging device in the Windows XP USBStor.INF file. Note that this is a system-protected file, which can be updated only by Microsoft.

Or

2. AutoPlay must detect image files on the cameras media when the device is initially connected to the PC.
Note: AutoPlay is not available for Windows Me.

Devices that comply with the USB MSC requirements can use the Windows XP Scanner and Camera Wizard; however, the device will not be able to exploit all the imaging innovations in Windows XP as described in Windows Image Acquisition earlier in this article.

If an imaging device will be represented as a storage device, then the implementation should use the Windows USB Mass Storage class driver.

Note: Microsoft advises against vendors writing their own USB storage driver.

A Mass Storage class device must generate a Windows compatible ID. The vendor must supply an INF entry for a device that uses the Windows XP USB Mass Storage driver unless the device uses a Windows generic Compatible ID. In this case, no user intervention is required for device connectivity. For Windows Me, an INF must always be supplied.

The Compatible ID is specific to individual Windows implementations and is generated from standard descriptor fields in the device. The values to generate a Compatible ID for Windows Me and Windows XP are a subset of those in the USB Mass Storage Class Bulk-Only specification:

  • bInterfaceClass: 0x08 (Mass Storage Class)

  • bInterfaceProtocol: 0x50 (Bulk-Only)

  • bInterfaceSubClass: 0x02 or 0x05 or 0x06

A USB device that has multiple physical endpoints is a USB composite device. A device that is represented as a composite device can be represented in multiple device classes, with independent communication mechanisms to support the functionality for each device class. This is an appropriate firmware approach to leverage multiple operating system features.

For example, a device could be represented as a composite device so that it can appear as both a still image device and a storage device. In this example, Windows Explorer would see two devices. However, a consistent, upgradeable user experience will be difficult to resolve if the functionality for an individual class overlaps that of other classes on the composite device.

Summary for Still Image Connectivity and Windows

Manufacturers of devices with extensive or unique image-related features should expose these features to Windows and Windows applications by writing WIA minidrivers.

Digital Cameras:

  • Implement either WIA or PTP to be eligible for the Windows Logo Program for Hardware for Windows Me.

  • Implement either WIA, PTP or USB MSC to be eligible for the Windows Logo Program for Hardware for Windows XP.

  • To allow users to programmatically change device properties, implement PTP in camera firmware or write device-specific WIA minidrivers.

  • To significantly reduce software development effort, and gain maximum compatibility, implement USB MSC.
    IMPORTANT: This option significantly limits the operating system provided features that the camera can use when connected to the PC.

  • To support the concurrent transfer of audio and video files to the PC, implement PTP in camera firmware.

Scanners and MFPs:

  • Scanner manufacturers that wish to reduce their software burden, establish connectivity, and are willing to expose a limited feature set should consider using the Microsoft WIA microdriver.

  • Multi-function Peripheral (MFP) or Scanner manufacturers should implement WIA (either mini- or micro-driver) if you are interested in the Windows Logo Program for hardware.

Call to Action for Still Image Connectivity and Windows

  • Thoroughly test still image installation and functionality with Windows operating systems.

    • Test devices on Windows 98 Second Edition, Windows 2000, Windows Me, and Windows XP. This includes testing the functionality and compatibility of all utility software that ships with the device.

    • Test upgrade scenarios from Windows 98 Second Edition to Windows Me to Windows XP Home Edition for both devices and related utilities.

    • Test upgrade scenarios from Windows 2000 to Windows XP Professional for both devices and related utilities.

  • If you are implementing support for the device as a USB Mass Storage class device:

  • Ensure your device generates a Windows Compatible ID.
    For more information about the USB mass storage specification, see
    http://www.usb.org/developers/devclass_docs#approved  This link leaves the Microsoft.com site

  • Test the device against the Windows XP AutoPlay feature as well as performing complete WIA driver testing. AutoPlay was first provided for testing as part of Windows XP Beta 1. Communicate issues to
    autoplay@microsoft.com. Communicate WIA issues to
    winimage@microsoft.com.

For more information about WIA, see http://msdn.microsoft.com/en-us/windows/hardware/gg463497.aspx. For information about WIA related requirements for the Windows Logo Program, see
http://msdn.microsoft.com/en-us/windows/hardware/gg463010.aspx.

For more information about the WIA microdriver, see "WIA Microdriver" in the Windows DDK documentation.

Glossary

Tethered
Attached

Expose
Make visible to end users or to applications

Innovate
Leverage a feature/capability for a competitive advantage

Metadata
Non-image data that represents information complementary to the picture, such as the environment in which the picture was taken, the author, the picture creation date, or the resolution.

Rate: