Is there an easy way to make a picture fade from black to normal?
like I have a Jpeg and I want it to fade from back to its normal colors.
Printable View
Is there an easy way to make a picture fade from black to normal?
like I have a Jpeg and I want it to fade from back to its normal colors.
Use GetPixel() to get the real color. Then use a loop and add 1 for every frame until it reaches the normal color. Use SetPixel() to put down the new color.
I dont know anything about setpixel :(
VB Code:
Public Declare Function SetPixel Lib "gdi32" Alias "SetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long SetPixel Form1.hDc, x, y, RGB(red, green, blue)
You have to use RGB() because it accepts a single color value. Form1.hDc can be replaced by whatever hDc your using.
That'll be much too slow!
Use alphablend API.
I completely forgot about speed. Haha. Okay well Setpixel()/Getpixel is slower than dirt.