how to dynamically change brightness of an icon?

Larry Bates larry.bates at websafe.com
Wed Dec 5 06:50:43 PST 2007


Alec Bennett wrote:
> Suppose I have an icon:
> 
> myIcon = wx.Icon("icon.ico", wx.BITMAP_TYPE_ICO)
> 
> Is there a way to dynamically change the brightness of
> that icon? In other words, make it just a bit brighter
> or darker, without having to edit the icon file by
> hand?
> 
> Thanks for any help.
> 
> 
> 
> 
> 
> 
>       ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page. 
> http://www.yahoo.com/r/hs

I'll bet that you best method would be to create more than one icon of differing 
brightnesses and just switch them out dynamically instead of using up CPU to 
change the brightness dynamically.  Just a recommendation.

-Larry





More information about the wxpython-users mailing list