[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

transition window to greyscale

Scott McChesney

12/10/2004 2:38:00 PM

I'm working on a project where I want to simulate the Windows XP
functionality when the user changes their color scheme - the window
gradually transitions to grey, and then the new color scheme is displayed.
I have basic groups of color schemes in my app, and I'd like to provide a
bit more "pop" when the user selects a new one.

I have been to Bob Powell's site, and I've seen his example on converting
color images directly to greyscale. My assumption is that a successive
application of ColorMatrix transformations will do the trick. However, I
don't understand enough about color theory (and remember enough about matrix
math) to create the matrices to take me incrementally from color to grey.

Any help would be appreciated.

TIA

- Scott


2 Answers

Bob Powell

12/10/2004 4:53:00 PM

0

If you revisit my site you'll see an article on modifying the colour
saturation of an image. This uses a ColorMatrix to adjust the saturation.
Completely desaturating an image will render it in monochrome. The demo
program sets the saturation values with a slider but you could easily do
this with a timer.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tips...

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/f...

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Scott McChesney" <scott.mcchesneyNOSPAM@us.army.mil> wrote in message
news:%234u2NXs3EHA.2316@TK2MSFTNGP15.phx.gbl...
> I'm working on a project where I want to simulate the Windows XP
> functionality when the user changes their color scheme - the window
> gradually transitions to grey, and then the new color scheme is displayed.
> I have basic groups of color schemes in my app, and I'd like to provide a
> bit more "pop" when the user selects a new one.
>
> I have been to Bob Powell's site, and I've seen his example on converting
> color images directly to greyscale. My assumption is that a successive
> application of ColorMatrix transformations will do the trick. However, I
> don't understand enough about color theory (and remember enough about
matrix
> math) to create the matrices to take me incrementally from color to grey.
>
> Any help would be appreciated.
>
> TIA
>
> - Scott
>
>


Scott McChesney

12/10/2004 6:44:00 PM

0

That does the trick. Thanks!

- Scott

P.S. Is there some reference book or other source material that you've
gleaned all this information from? I've always had a curiosity for color
theory and things like this, but I've never really found any material on it.

"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:%236b7Kjt3EHA.404@TK2MSFTNGP10.phx.gbl...
> If you revisit my site you'll see an article on modifying the colour
> saturation of an image. This uses a ColorMatrix to adjust the saturation.
> Completely desaturating an image will render it in monochrome. The demo
> program sets the saturation values with a slider but you could easily do
> this with a timer.
>
> --
> Bob Powell [MVP]
> Visual C#, System.Drawing
>
> Find great Windows Forms articles in Windows Forms Tips and Tricks
> http://www.bobpowell.net/tips...
>
> Answer those GDI+ questions with the GDI+ FAQ
> http://www.bobpowell.net/f...
>
> All new articles provide code in C# and VB.NET.
> Subscribe to the RSS feeds provided and never miss a new article.
>
>
>
>
>
> "Scott McChesney" <scott.mcchesneyNOSPAM@us.army.mil> wrote in message
> news:%234u2NXs3EHA.2316@TK2MSFTNGP15.phx.gbl...
> > I'm working on a project where I want to simulate the Windows XP
> > functionality when the user changes their color scheme - the window
> > gradually transitions to grey, and then the new color scheme is
displayed.
> > I have basic groups of color schemes in my app, and I'd like to provide
a
> > bit more "pop" when the user selects a new one.
> >
> > I have been to Bob Powell's site, and I've seen his example on
converting
> > color images directly to greyscale. My assumption is that a successive
> > application of ColorMatrix transformations will do the trick. However,
I
> > don't understand enough about color theory (and remember enough about
> matrix
> > math) to create the matrices to take me incrementally from color to
grey.
> >
> > Any help would be appreciated.
> >
> > TIA
> >
> > - Scott
> >
> >
>
>