|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Alastair Watts
|
Oct 2, 2011 - 4:34 AM
|
I’ve noticed that RGB/A icons drawn using Prof UIS don’t have as smooth edges as when drawn by MFC. There seems to be a difference with how the alpha channel is processed. Is there anything that can done to improve this?
|
|
Alastair Watts
|
Oct 8, 2011 - 5:28 AM
|
Please accept my apologies for thinking I knew better! The following does indeed work :) CExtBitmap::LoadBMP_Resource(); CExtBitmap::AlphaBlend();
|
|
Alastair Watts
|
Oct 8, 2011 - 2:36 AM
|
I don’t think you are right. The alpha channel is being handled by the Prof UIS API - but it is drawn darker than DrawIconEx() does. The loaded icon is not being reduced to low colour & no image lists are needed to show the problem. I am right in thinking Prof UIS has its own alpha-channel algorithms? If so I believe the problem is either CExtBitmap::AssignFromHICON() or CExtBitmap::AlphaBlend(). This is easily demonstated by performing the steps I mentioned in my earlier post.
|
|
Technical Support
|
Oct 8, 2011 - 9:37 AM
|
This may be a specific problem for a particular computer. Because nobody reported similar issue yet. The CExtBitmap::AlphaBlend() API uses the only available Win32 API for alpha channel output: the AlphaBlend() function from MsImg32.dll module. Other icon painting APIs should do the same.
|
|
Alastair Watts
|
Oct 6, 2011 - 11:07 AM
|
The following draws the alpha channel correctly: LoadImage() DrawIconEx() The following draws grey pixels around the edge that shouldn’t be there & gives a slightly jagged look LoadImage() CExtBitmap::AssignFromHICON() CExtBitmap::AlphaBlend() CExtToolControlBar, CExtGridWnd, etc. all draw icons incorrectly.
|
|
Technical Support
|
Oct 7, 2011 - 11:54 AM
|
The problem can be hidden in the LoadImage() Win32 API or Windows image list APIs used by the AssignFromHICON() method. Both Win32 API may prefer a non-32-bit version of the icon image and choose a low color version instead. The solution is to never use ICO files and resources. Use 32-bit BMP and PNG files instead.
|
|
Technical Support
|
Oct 5, 2011 - 11:00 AM
|
Prof-UIS fully manages BMP formats including the alpha channel. We need more details about what’s wrong with the icons in apps running on your PC.
|
|
Alastair Watts
|
Oct 4, 2011 - 10:58 AM
|
I’ll post a sample project when I get a chance. Prof UIS is definately processing the alpha channel, its just drawing the edges a bit darker than MFC does, giving a more jagged look.
|
|
Technical Support
|
Oct 4, 2011 - 5:42 AM
|
Please provide us with more details and/or screen shots.
|
|