LEADTOOLS Support
Imaging
Imaging SDK Questions
Display of PNG images with alpha transparency
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, July 23, 2009 9:31:54 AM(UTC)
Groups: Registered
Posts: 2
We extensively use PNG images with transparency (using alpha channel). I've managed to successfully load and save these images using LEADTOOLS with the alpha information preserved; however, I can't figure out how to get the RasterImageViewer to display them correctly without modifying the image data.
Is there some way to inform the viewer that it should interpret the alpha channel as transparency data, in accordance with the PNG specification?
Thank you,
Ben
#2
Posted
:
Thursday, July 23, 2009 10:23:30 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
What is the file version of Leadtools.dll that you are using?
In 16.5, we added the ability for the RasterImageViewer to automatically do alpha channel painting. To do this, you need to set the RasterPaintProperties.PaintEngine to RasterPaintEngine.GdiPlus.
If you're using 15 or older, you need to create a background image of the color you want for the background, then use the FeatherAlphaBlendCommand to paint the image with alpha transparency.
#3
Posted
:
Thursday, July 23, 2009 10:53:41 AM(UTC)
Groups: Registered
Posts: 2
Great; the GdiPlus PaintEngine works like a charm.
Thank you,
Ben.
LEADTOOLS Support
Imaging
Imaging SDK Questions
Display of PNG images with alpha transparency
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.