Markup images not rendered correctly in 16.2.3 |
Post Reply |
Author | ||
flashk
Groupie Joined: 04 March 2008 Status: Offline Points: 44 |
Post Options
Thanks(0)
Posted: 25 August 2013 at 6:16pm |
|
I just upgraded from 15.0.2 to 16.2.3 and noticed that markup controls don't render images with alpha channels correctly. I've attached a screenshot showing the difference between the two versions.
I'm using the following markup to specify the image from its resource ID (based on a 32-bit PNG):
Is this a known issue? Do I need to change the markup or other setting to render the image correctly?
|
||
flashk
Groupie Joined: 04 March 2008 Status: Offline Points: 44 |
Post Options
Thanks(1)
|
|
I believe I've found why the images are not being rendered correctly. The code for rendering markup images was changed from:
to:
This change seems to cause the image to be drawn using GDI+ instead of GDI. The CXTPMarkupGdiPlusDeviceContext class seems to draw images with alpha channels incorrectly. In CXTPMarkupGdiPlusDeviceContext::IconToGdiplusBitmap, the PixelFormat32bppARGB flag is used to create the bitmap for rendering. However, I believe the flag should be changed to PixelFormat32bppPARGB, since the CXTPImageManagerIcon object stores pre-multiplied alpha values. Making this one change seems to fix the image rendering issues for me.
|
||
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
|
|
It would be really nice to get this problem fixed in the XTP sources.
|
||
astoyan
Admin Group Joined: 24 August 2013 Status: Offline Points: 302 |
Post Options
Thanks(0)
|
|
Thank you, flashk, for the suggestion. The fix has been added.
Regards, Alexander
|
||
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
|
|
> The fix has been added.
Excellent, thanks!
|
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |