Sunday, 15 March 2015

c# - Best way to fade in/out image -


What is the best (least resource heavy) way of removing the image in every 20 seconds with the duration of 1 second

(About an image of about 350x130px) For a simple screensaver I need this which is going to run on some low level computers (Xp).

I am currently using this method against a picture box, but it is very slow:

  Private image lighter (image imelite, int level, int NRD , Int nGreen, int nBlue) {graphics graphics = graphics.frame image (imgLite); Int conversion = (5 * (level - 50)); Pen yellowite = new pen (color. Formarbb (conversion, nred, ngreen, nblue), imgLight with * 2); Graphics. Drainline (PLEET, -1, IGGLightWith, IMGlightHight); Graphics.Save (); Graphics.Dispose (); Return imglight; }  

You might use a color matrix on MSDN just like this example.


No comments:

Post a Comment