KS> When I'm inverting a picture, I read the pixels with 'Pixels[][]', get
e
Are you saying that you are replacing each color with it's opposite?
What video mode are you using (0x13) ?
To change color in vga 320x200x1 byte of color, you only need to
manipulate the palette to change colors. In mode 0x13, you have
up to 256 colors (range 0-255):
{Pascal code, where color,read,green,blue are bytes
Begin { SetColor }
Port[$3C8] := Color;
Port[$3C9] := Red;
Port[$3C9] := Green;
Port[$3C9] := Blue;
End; { SetColor }
{// UNTESTED in C++
outportb(0x3c8, color);
outportb(0x3c9, red);
outportb(0x3c9, green);
outportb(0x3c9, blue);
}
KS> where's my mistake, are there special features of 'Pixels' or 'RGB'?
A pixel can be though of as a dot on the screen, that is a mixture or
red,green, and
blue (different shades, actually 3 smaller dots make one pixel)
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)
|