DIRECTIONS and OTHER IMPORTANT STUFF GENERAL AND PRELIMINARY STUFF: If you're like me, you hate to trash your investment in your 256 gray scale scanner and then spend a hefty chunk of change for a color scanner. This program provides an inexpensive alternative. 256SCAN is a straight-forward, alternative way to produce full color images from any 256 gray-scale capable scanner. 256SCAN is fast and once you have done it once or twice, easy to use. By using a red, green, and blue filtered PCX input (R.PCX, G.PCX and B.PCX, respectively, a full 24-bit color Windows compatible .BMP (RGB.BMP) image is produced. This image can be viewed, have the infinite number of colors reduced to 16 or 256 and can be converted to .GIF, .PCX, .TGA, or any other format. Detailed methods for using a flat-bed and hand-held scanner are provided. MATERIALS REQUIRED: 1) Any 256 gray-scale scanner. 2) A 286 or better computer. 3) Three filters (see paragraph on filters, below). 4) Something to scan (photo, magazine picture, etc.). 5) If using a hand scanner, a scanner guide such as the ScanAlign by American Business Concepts. 6) A small amount of scotch tape or masking tape. 7) A file viewer program (such as VPIC, or Graphics Workshop). I feel Graphics Workshop is one of the better viewing/conversion programs. It's available on most BBS's and from most of the shareware catalogs. I highly recommend it. Filters: You will need three filters, a red, a green, and a blue one. You can buy photographic quality gel filters or acquire two sheets of each color of overhead projector film. These are relatively cheap and work like a charm. BASIC METHOD: 1) Three scans of the color item (photo? drawing?) need to be made. One each using a red filter, a green filter, and a blue filter. These need to be in 256 gray-scale PCX format. The scans can be made directly into PCX format or converted using a paint or conversion program. (See below for details on using a flat-bed or hand-held scanner. 2) The PCX files need to be labeled R.PCX for the red scan, G.PCX for the green scan, and B.PCX for the blue scan. 3) All three PCX's must be in the same sub-directory as 256SCAN.EXE. 4) Type 256SCAN and sit back until it's done (depending upon the speed of your machine, it won't take more than 2-3 sips of coffee. 5) 256SCAN produces 4 output files: R.BIN, G.BIN, B.BIN and RGB.BMP. Make sure all three BIN files are the same size in bytes. If not, then the input .PCX's were not the same physical size (in pixels) The BIN and PCX files can and should be deleted. 6) This is where you'll now need your file conversion or paint program. Since I prefer Graphics Workshop, I describe it, although other programs may work as well. 7) Bring in RGB.BMP (the Windows Paint works well for this) and check that it is not skewed (if it is, see Skewing, below for corrective action. 8) Flip the RGB.BMP vertically and save it. Don't ask why, but for some strange reason, Microsoft wants their BMP files to read from the end, not the beginning. 9) If you'll be using the BMP output with Windows and a proper 24-Bit video card, you'll have a color image. 10) Use your conversion program to convert it to a .GIF, .PCX or whatever format you choose and reduce to 256 colors. Most photos will need to be dithered to look right. The Stucki dither provides the best dithering. (This is one of the areas that Graphics Workshop shines.) Do note that some scanners/paint programs dump their PCX files in a negative image format (like a photographic negative) which can be changed by using Graphics Workshop. 11) If the colors do not appear right, some viewers, such as VPIC will allow color adjustments. Otherwise, rescan the R.PCX, G.PCX, and B.PCX making adjustments to the brightness to compensate. After a little practice, you'll get the hang of it. 12) Enjoy your color image. FLAT-BED SCANNER METHOD: 1) Place the photo on the scanner glass against the side. Use a piece of tape to secure it. DO NOT put the tape on the glass. 2) Place the red filter under the photo and scan. Save as R.PCX. If .PCX is not an output choice, save as your scanner output and convert to R.PCX using a paint, VPIC, or Graphics Workshop. After viewing the output (RGB.BMP) you may find you need a double layer of filter. Remove the red filter from the scanner. 3) Repeat for the green filter (save as G.PCX) and the blue filter (save as B.PCX). 4) Use the general method (above) to finish the picture. HAND-HELD SCANNER METHOD: 1) Place the photo on the scanner guide. 2) Place the red filter on the scanner guide. 3) Place the scanner into the scanner guide and scan to produce a R.PCX. 4) Replace the red filter with the green filter and rescan exactly. Repeat for the blue filter. 5) Use the general method (above) to finish the picture. PROBLEMS: A few things can go wrong or at least have the appearance of being wrong. For the most part the correction is fairly simple. Skewing: If the image appears to be skewed (i.e.: a line running from one corner diagonally down the image to the opposite corner. The image will appear to be split on each side of the line. This is cause by variations in scanner output. The cure is easy. Try scanning as a .TIF or other output and convert to a .PCX using Graphics Workshop, VPIC, or a paint program. If that fails, scan using a multiple of screen width for the width of the image (i.e.: 640 wide, 320 wide, 160 wide or 80 wide). Color Abberations: These are simple to cure. Change the brightness setting for the color that is causing the problem. A little experimentation will provide the best setting. If that seems like too much trouble, various viewing programs (VPIC for example) allow the color (red, green, blue) to be adjusted as well as modifying the contrast and brightness. MISCELLANEOUS BACKGROUND, ACKNOWLEDGEMENTS, AND OTHER STUFF: Background: This program incorporates techniques from both the graphics programmer's world and the printing world. When a printer makes a full color printing, the original image is turned into negative using filters to produce a red, yellow, blue, and a black negative. These are then used to produce the printing plates and thus a color print. This program uses the same concept. But instead of producing a negative, a 256 grey-scale .PCX is used to provde the relative strength of red, green, and blue components of a 24-bit full color image. Acknowledgements: Even though we've never met or spoken, I am deeply indebted to Steve Rimmer for his books BITMAPPED GRAPHICS, and SUPERCHARGED BITMAPPED GRAPHICS and for his program GRAPHICS WORKSHOP. He has also written DESKTOP PAINT256. If he hadn't written them, I wouldn't have had a clue as to how to write this program. If you are into graphics, these two books should definitely be on your bookshelf and these two programs should be in your repretoire. Miscellaneous Stuff: This program was written using Borland C++ (not Turbo). The source code is included. If you have any improvements or suggestions, please send them to the Author.