Board index » cppbuilder » Dithering 256 colors BMP for 16 colors VGA mode

Dithering 256 colors BMP for 16 colors VGA mode

Please suggest me any online resources, where I can find
some information about dithering 256-colors bitmap for
16-colors Standard VGA screen mode.
Image processing books are unaccessible in my local.

Thank You, Pasha N.

 

Re:Dithering 256 colors BMP for 16 colors VGA mode


Quote
> Please suggest me any online resources, where I can find
> some information about dithering 256-colors bitmap for
> 16-colors Standard VGA screen mode.
> Image processing books are unaccessible in my local.

256-colors image have palette, describing RGB colors for
each entry.
16-colors mode have the same paletter but with RGB values in
range [0..63] and 16 entries length.
You need do 3 things:
 - make paletters the same. By scale down 256-entry paletter
or by scale up 16-entry paette
 - make assotiations table for biggest paletter with numbers
in smaller. F.e:
   struct {
     RGB color;
     int smallIndex;
   } bigPal[255];
   for ( int n = 0; n < 255; n++ )
     bigPal[n].smallIndex = FindNearestInSmall( bigPal[n] );
 - simple out(convert) image, replacing all pixels with just
founded

Other Threads