It’s no big secret that over the last few years hardware prices have fallen while the quality and capabilities of such hardware have increased dramatically. In fact, it seems that practically everyone who owns a computer also has a scanner and a color printer that are capable of reproducing images in a way that could only be done by professional print shops just a few years ago. The process behind creating such images has also been greatly simplified. With just a few mouse clicks it’s possible to scan and print an image with a minimum of effort. Part of the reason for this, though, is that several little-known Windows 98 components are at work behind the scenes to make sure that your images turn out looking their best. In this Daily Drill Down, I’ll discuss those components and describe how they work.
Imaging components at work
The entire process of moving an image from a scanner to a printer is actually quite complicated. Because of this fact and my space limitations, I’ll limit the discussion in a way that excludes the print APIs. Instead, I’ll focus on the process from the time of scanning until just before printing. Image printing is a science all by itself.
Beyond the obvious, there are actually three major Windows 98 components at work behind the scenes any time you scan and process an image. These components include TWAIN drivers, Image Color Mapping 2.0 support, and Still Image Architecture and Device Support.
Before you can understand the process of acquiring images, you need to know a little bit about TWAIN. TWAIN is an industry standard set of APIs that dictates how an operating system should interact with image-related devices, such as digital cameras and scanners. Windows 98 includes these APIs. This means that any application that makes a call to these APIs is considered to be TWAIN-compliant. In plain English, this means that any TWAIN-compliant software can be used to acquire an image from any TWAIN-compliant imaging device. For example, I use a program called MGI PhotoSuite to capture and process all the images that I use in my articles. As is the case with most Windows 9x graphic editors, MGI PhotoSuite is TWAIN-compliant. This means that I can scan images without ever leaving the application. I can also download images from digital cameras directly into the application.
As you can see in Figure A, MGI PhotoSuite offers two commands on the File menu that facilitate the acquisition of images. These commands are Acquire and Select Source. The Select Source command allows you to select which device you want to pull the image from. For example, you could choose between getting an image from a scanner or from a digital camera. Once you’ve selected the device, you can use the Acquire command to actually retrieve the image from the device.
The Acquire and Select Source commands aren’t unique to MGI PhotoSuite. Rather, the commands are actually a part of Windows 98. Because TWAIN-compliant applications call the Windows 98 APIs that are associated with these commands, most TWAIN-compliant applications include these two commands, although the Acquire command is sometimes changed to Scan. The simplest way to verify that these commands aren’t unique to the application is to try out the Acquire command. When you do, you’ll see the application launch your scanner’s software. For example, if I click the Acquire button on my system, Windows will call the HP ScanJet software. The software that came with your scanner will be used for the actual scanning process, but when the scan completes, the scanner software will be closed and the image will automatically be transferred to the application that invoked the scanner software.
The process of scanning an image through an application uses four basic components. In order of use, these components are the application software, the TWAIN data source, the device driver, and the still image device.
The process begins within the application software when a user selects the source and then issues the Acquire command. At this point, the software looks at the device you’ve selected and begins implementing instructions for transferring the image. Next, the TWAIN data source calls the device driver. This is typically the software written by the hardware manufacturer that actually controls the scanning process. Finally, the device driver makes the calls to the physical hardware and the still image device that begin the scanning process.
Image Color Mapping 2.0
Now that you understand how the actual scanning process works, let’s take a look at another component of Windows 98’s imaging-related code, called Image Color Mapping 2.0. As you’re no doubt aware, there are several steps that an image passes through from acquisition to printing. For example, in the case of commercial printing, the image is scanned and may be edited by several different artists. Usually, the image is then sent to a print shop that generates a proof image that is reviewed before the final image is mass-produced. With so many steps involved, there’s great potential for the image’s color to get changed along the way. For example, if one of the artists’ monitors isn’t tuned properly, they may get a false sense of what colors the image actually consists of. Some printers may also reproduce image colors incorrectly.
To get around this little problem, Microsoft uses a technology called Image Color Mapping 2.0. Image color mapping is a process by which Windows 98 ensures that the image appears accurately on the screen and is reproduced accurately on the printer.
To make this process possible, scanners (and other input devices) must provide Windows 98 with either an ICC (International Color Consortium) color profile or output the image using sRGB. Windows 98 includes its own color profile for dealing with sRGB images. By establishing a color profile for the image, Windows 98 knows the image’s true colors.
You’ve probably noticed that when you initially install Windows 98 (or change monitors) Windows 98 tries to detect the exact model of your monitor. This is because Windows 98 has a built-in color profile for the monitors it can detect (it uses a generic color profile for other monitors). By comparing the image’s color profile with the monitor’s color profile, Windows 98 can ensure that the image is displayed accurately. Likewise, printers also have a color profile associated with them. This allows images to be printed accurately as well.
Still image architecture
The final piece of the puzzle is the way that Windows 98 supports the actual imaging hardware. As you probably know, most imaging hardware is detected through Plug and Play, and if the device isn’t automatically detected, it can be installed manually through the Add New Hardware Wizard. Once the first device has been installed, Windows 98 sets up a special Control Panel icon for it called Scanners And Cameras. Through this icon, you can manage any TWAIN-compliant scanner, camera, or other input device.
The Scanners And Cameras applet lists each TWAIN device installed on your system. You can work with individual devices by selecting them and clicking the Properties button. When you do, you’ll see the device’s Properties sheet.
The Properties sheet for each device contains several very handy tabs. The General tab provides some basic information about the device model and the port that it’s connected to. The next tab is the Events tab, shown in Figure B.
|The Events tab lets you associate device events with your software.|
The Events tab allows you to associate device events with your scanner. For example, you could associate the event of a document being scanned with the opening of MGI PhotoSuite or another graphics package. As you can see in the figure, my particular scanner also supports setting events to correspond with the pressing of buttons on the scanner. For example, if you press the E-Mail button, the image will be scanned and placed into an Outlook 2000 message. As you can see in the figure, you can also disable the events if necessary.
The next tab you’ll encounter is the Troubleshooting tab, shown in Figure C. This tab will vary from device to device. For example, the Troubleshooting tab shown in the figure provides the basic scanner communication tests, but it also tests the automatic document feeder. Obviously, most of the scanners on the market don’t have automatic document feeders, so this option doesn’t always exist on this tab.
|The Troubleshooting tab allows you to test the scanner.|
Some scanners also include a Lamp tab on their Properties sheet. This is especially true of Energy Star-compliant scanners. Such scanners allow you to control how long the scanner’s lamp stays on while the scanner is idle. Obviously, the sooner you disable the lamp after a scan, the longer the lamp will last, and the less electricity you’ll use. The flip side is that many times a lamp must be warm before the scanner will allow you to scan an image. If you have a lot of scanning to do, it’s best to leave the lamp on so that you don’t have to wait for it to warm up between scans. Remember that these Properties sheets are geared toward both scanners and digital cameras. Therefore, if you’re looking at the Properties sheet for a digital camera, don’t expect to see a lamp tab.
The final tab on the scanner’s Properties sheet is the Color Management tab, shown in Figure D. This tab controls the color profile that’s associated with the scanner. As I mentioned earlier, the color profile controls how the image will be displayed and reproduced.
|The Color Management tab controls the color profile associated with the scanner.|
In this Daily Drill Down, I explained that there’s more to the scanning process than meets the eye. As I did, I discussed how Windows 98 works behind the scenes to help users acquire and process scanned images.
Brien M. Posey is an MCSE who works as a freelance technical writer and as a network engineer for the Department of Defense. If you’d like to contact Brien, send him an e-mail. (Because of the large volume of e-mail he receives, it's impossible for him to respond to every message. However, he does read them all.)The authors and editors have taken care in preparation of the content contained herein, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.