Using the VGAGRAY.DRV Display Driver

The VGAGRAY.DRV display driver maps the color in an image to a gray-scale palette with 16 shades of gray. This display driver provides a good monochrome representation of 256-color images on a standard VGA display. The gray-scale value used is determined from the RGB color based on the following color weights:

Gray_value = (2 × Red_value + 5 × Green_value + 1 × Blue_value) / 8

By default, the VGAGRAY.DRV display driver uses a linear palette, but it can be changed by adding a [DISPLAY] section to the WIN.INI file. When Windows is started with VGAGRAY.DRV, VGAGRAY.DRV reads the [DISPLAY] section of the WIN.INI file and substitutes the values listed for the default values. The [DISPLAY] section has the following form:

[DISPLAY]
        Gray0 = 0                ;        0
        Gray1 = 31                ;        1F
        Gray2 = 47                ;        2F
        Gray3 = 63                ;        3F
        Gray4 = 79                ;        4F
        Gray5 = 95                ;        5F
        Gray6 = 111                ;        6F
        Gray7 = 127                ;        7F
        Gray8 = 143                ;        8F
        Gray9 = 159                ;        9F
        GrayA = 175                ;        AF
        GrayB = 191                ;        BF
        GrayC = 207                ;        CF
        GrayD = 223                ;        DF
        GrayE = 239                ;        EF
        GrayF = 255                ;        FF 

The characters 0 through F appended to the Gray keyword is the index to the gray-scale value. The integer is the gray-scale value. The gray-scale value can range from 0 through 255. Values listed represent the internal gray-scale values VGAGRAY.DRV uses by default. You must add the [DISPLAY] section to the WIN.INI file only if you want VGAGRAY.DRV to use other gray-scale values.