"Toby Nance" <to********@student.oc.edu> wrote in message
news:a1*************************@posting.google.co m...
I don't know how to do the transition automatically, but I know you
can do it manually. The Bitmap object has a GetPixel function which
will return the RGB value of a particular pixel of a picture. If you
get the RGB values of both pictures at the same pixel, it would be
possible to transition between the two pixel colors. This would be
processor intensive, so you may save off the resulting images to
display if you are going to show the transition multiple times.
I did something similar here, which you can modify to make the
transition.
I would recommend NOT using GetPixel / SetPixel as they are really slow. If
you have to do it manually, then the only way to go is unsafe code with
bitmap.LockPixels and some pointer arithmetic. Here's a good example of
that:
http://www.codeproject.com/cs/media/...cfilters11.asp
On a smallish picture (maybe 100x100 pixes) performance will probably be
acceptable. If you're doing full screen fades, I think you'll find it hard
to get more than about two frames per second. DirectX would probably have
some routines to do it faster, but that's getting to be a lot of work for
just simple image transition.
I'm betting that P/Invoke is the way to go...
--
Mike Mayer
http://www.mag37.com/csharp/ mi**@mag37.com