Icons

Joe Krahn jkrahn@nc.rr.com
Mon Aug 29 23:44:00 GMT 2005


Colin Harrison wrote:
> Hi,
> 
> Just did a hack along the lines of:-
> 
> Make Icons from X hints at 32 pixel iconSize (using Earle's algorithms as
> they stand) and convert the icon to
> whatever size was requested from winXIconToHICON along the lines of:
> http://www.codeguru.com/Cpp/G-M/bitmap/icons/article.php/c4943/
> 
> 
> Worked for me 16x16 (no stripped mask problems).
> 
> I've got to find some 24x24 etc examples somehow?
> 
> I'm on XP, 48,32,24 and 16 pixel icons only possible. Should we just work
> with these values?
> 48x48, 32x32 and 16x16 are recommended by MS (no 24x24?).
We should only create SM_CXICON and SM_CXSMICON sizes, which for now 
means 16 or 32 bits. I think 48-bit is recommended mainly for displaying 
icons from file resources in explorer windows.

> 
> This one may be useful for alpha blending code in future:-
> 
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318876
> 
> I'm lazy, surfing for code is sometimes easier than writing it :)
Surfing for code is always good. Why re-invent the 'wheel'?

I already have code that handles Alpha, and creates 'standard' icons if 
Alpha is not supported (only important for pre-XP). Alpha icons in X are 
currently only supported by NET_WM properties. The trick for Alpha is 
realizing that RGB values must be pre-multiplied by Alpha. This is why 
colored pixels show up where the 'alpha' bitmask is zero: the RGB pizels 
are supposed to have been multiplied by zero.

I'll work in some new code and post it [hopefully] tonight.

Joe

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list