[comp.binaries.ibm.pc.d] How to map darkest to lightest in 256 color VGA?

shite@unf7.UUCP (Stephen Hite) (09/17/90)

  My VGA card (Video7 Fastwrite w/512K) does not have a 256 gray scale.  I'm
trying to map the 256 colors from darkest to lightest (000 -> 255) so I can
display a binary image file.  I've been using Ghostscript 2.0 but I'd like
to try it in color to see what it looks like.  When I try no mapping at all,
I can make out the image but the intensity to color numbering is way off.  It 
seems that if I could reorder them properly that the image would be clearer.

   I'm using INT 10 with the special modes mentioned in the Fastwrite manual
to write the dots to the screen (the image is 256 x 256 x 8).  Thanks for
the help!

------------------------------
Steve Hite
...gatech!uflorida!unf7!shite

DRJ100@psuvm.psu.edu (Daniel R. Jeuch) (09/20/90)

In article <300@unf7.UUCP>, shite@unf7.UUCP (Stephen Hite) says:
>
>  My VGA card (Video7 Fastwrite w/512K) does not have a 256 gray scale.  I'm
>trying to map the 256 colors from darkest to lightest (000 -> 255) so I can
>display a binary image file.  I've been using Ghostscript 2.0 but I'd like
>to try it in color to see what it looks like.  When I try no mapping at all,
>I can make out the image but the intensity to color numbering is way off.  It
>seems that if I could reorder them properly that the image would be clearer.

It is a common mistake that when one says that VGA has 256 colors, that means
that you can use 256 shades of one color.  All the 256 stands for is that you
can MAP 256 different colors into the palette... Actually, you can only do
64 shades of Red, Green, and Blue, and any combination thereof.  So,
essentially, if you want a grey scale in white, you must program 64 colors
of the palette to 0,0,0 R,G,B, then 1,1,1, 2,2,2, and so on... up to 63.
>
>------------------------------
>Steve Hite
>...gatech!uflorida!unf7!shite
-----
Daniel R. Jeuch                   Microsoft Corp. Student Rep.
10 Vario Blvd., Box 185           DRJ100@PSUVM, drj100@psuvm.psu.edu
State College, PA  16803          (814) 867-4622, (800) 232-5129