★ wanayoo — archive 1999 http://www.devshed.com/Client_Side/Graphics/Scanning/print.htmlNouvelle recherche | Portail wanayoo
DevShed.com 

Scanning Images for Web Use
By Bryan Montford
September 09, 1999

Printed from DevShed.com
URL: http://www.devshed.com/Client_Side/Graphics/Scanning/


Introduction
As humans, we live in a dominantly visual world. Since pre-historic times man has communicated via visual representation. We've been refining and changing the way we do it ever since. Two of the latest innovations used to further this age-old quest are the scanner and the Internet. Getting scanned images onto your Web page isn't difficult. These guidelines will assist you in getting clean, professional looking results every time.

Materials:

Difficulty: Novice
You need to be familiar with your equipment and software. Have the manuals handy if possible. You may need to consult them.


Monitor Calibration
The first part of the battle is not the most obvious. How does your monitor look? No, not the smudges and other gunk (although it's a good idea to remove these now). If you haven't calibrated your monitor, I recommend you do. Version 5.0 of Photoshop comes with software to help you calibrate your monitor. There are also many 3rd party solutions available. If you own a Mac compatible you can use Colorsync from Apple for color management and gamma correction. If you're on a Windows compatible PC then your video card might have calibration software with it. Try for a target gamma of about 2.0. (Gamma refers to the difference between the input to a monitor versus its output. For a detailed explanation see http://www.vtiscan.com/~rwb/gamma.html) It's in between the standard PC gamma of 2.2 and the Macintosh default gamma of 1.8. You can choose whatever settings suit you, but keep in mind that your audience probably isn't using your monitor. The more neutral your monitor is, the better possibility you have of creating an image that looks good on other monitors too.

Does your scanner's software offer automatic color and contrast compensation? Try it out and turn a critical eye to the results. Is it obviously out of whack with the piece you scanned? If so, consult the manual on how to set the curves for your scanner. It's much easier to get a good scan the first time then to try to fix a bad one later. Most scanners, even inexpensive ones, do a passable job in digitizing images these days. Don't be misled by that statement. A good entry-level DTP scanner can cost several thousand dollars and a high quality drum scanner will cost $10,000 or more. Most low-end flat bed scanners are suitable for basic scanning needs such as on screen graphics.

Getting the Best Image
Photographs are a common item to find on your scanner. If the image is fairly clean and needs little adjustment, scan the image at millions of colors at 72 dpi. This is the straightest path to getting an image on the Web. Save the file as a JPEG at image quality 3 or medium. Done!

Are you scanning images from a brochure or catalog? Color printing usually consists of dots of different colors placed closely to each other to give the illusion of continuous color. If you have a magazine or other printed piece handy look closely at the images. You may not see these dots at first glance. In fact, you're not supposed to. The whole point is to create the illusion of continuous tone. Even if you don't see these dots, you're scanner will. The resulting patterns are called moiré patterns. Most scanner software has a "de-screening" function available. If yours does, select the setting that most closely matches the type of print you are scanning. If you're scanning newsprint, select newsprint. If scanning a magazine, select magazine, and so on. By using the de-screening function you may get a perfectly usable image at 72 dpi. If after using the de-screening filter you still have unwanted moiré artifacts or if you don't have a de-screening function try using these suggestions.

Even though you're only going to need a 72-dpi image, you may find it necessary to scan the original at a higher resolution and then down sample it to get acceptable results. Choose a resolution that isn't a multiple of the line frequency of the printed material you are scanning. Not sure what the lpi is for the piece you're scanning? Here is some number to give you an approximate idea; these numbers are by no means exact.

News Print - 65 lpi
Magazine - 133 lpi
Art Magazine (fine prints) - 175 lpi

I usually use 147-dpi. It's a fairly odd number (in context) and will usually help to break up any unwanted patterns. Be sure to still use the de screening filter on your scanner even if you employ this over sampling technique (assuming that you have the de screening filter). If the result is satisfactory, or very close, down sample the image to 72-dpi and save it out as a JPEG.

Still not useable? Try blowing the darned thing up! Not with explosives, enlarge the image in your image-editing program. 300% should do the trick. Then resize the image back down to 72-dpi. Making the image larger forces the program to "fake" the additional pixels leaving the image slightly blurry. When you resample the image back to 72-dpi, the program has to throw away a lot of the pixels making it "average out" the results. You can also use odd multiples when resizing an image to further reduce unwanted artifacts. Resizing an image this way "jumbles" pixels together minimizing artifacts.

Another trick you can try is rotating the image a few degrees. Sometimes this just isn't acceptable, but if so, it can help you break up visible and unwanted patterns in your image. Of course, you can employ any or all of the above techniques. Just keep in mind that all of these are "destructive" actions (except for scanning, of course.) A destructive action is one that destroys original pixels and replaces them with pixels of a different value. For example, cropping an image isn't a destructive action but resizing it is. Cropping an image doesn't change the pixels that are left; it removes those that are no longer wanted. If you resize an image, you change every pixel left in the image to a different value.

Tips & Tricks

Getting usable scans onto your Web site isn't hard. Follow these guidelines and spend some time getting to know your equipment. Working together, with proper application of these ideas, we may save millions from the sheer horror of unsightly scanned images on the Web. Okay, maybe that is a little lofty. This probably can help your site look nicer and load a lot faster, and wouldn't that make the world a nicer place?


Copyright © 1997-99 ngenuity. All rights reserved.