ijcro you are the best

DXDraw.Surface.Pixel[X, Y] not persistent, but I not change DxDraw.Surface, I change DXImageList.Items[1].PatternSurfaces[0] and work very fast (100 times or more than Pixels), now change 256 pixels eah milisecond and FPS down 100 to 90.

But I have 2 problems :cry:

* In 32bits color work fine, but in 16bits color return a green image:

ORIGINAL IMAGE:


FULL RAIN 32 BITS COLOR:


FULL RAIN 16 BITS COLOR:



I testing:
[pascal]
// read pixel color
ColorPixel := DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y]; //original color image
R := GetRValue(ColorPixel);
G := GetGValue(ColorPixel);
B := GetBValue(ColorPixel);
// efect color over R, G, B
// ..........
// write pixel color
DXImageList.Items[2].PatternSurfaces[0].Pixel[X,Y] := RGB(R,G,B);
[/pascal]

In 32 bits first pixel return R=41, G=106, B=137 and 16 bits return R=69, G=139, B=0. In 16 bits all Blue Pixel return 0. I'm test with ColorToRGB and same result:
[pascal]
// read pixel color
ColorPixel := ColorToRGB(DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y]); //original color image
R := GetRValue(ColorPixel);
G := GetGValue(ColorPixel);
B := GetBValue(ColorPixel);
// efect color over R, G, B
// ..........
// write pixel color
DXImageList.Items[2].PatternSurfaces[0].Pixel[X,Y] := RGB(R,G,B);
[/pascal]


2¬? Problem is when change full screen to windowed mode or viveversa or I move window (in windowed mode) arround desktop, image restore to original image, lost new color :shock: DrawAlpha efects also get lost.

¬ø Any solution to 2 problems ?

Thanks.