LEADTOOLS Support
Imaging
Imaging SDK Questions
ImageViewer with floater - Make white data transparent
#1
Posted
:
Thursday, May 14, 2015 10:33:56 AM(UTC)
Groups: Registered
Posts: 4
I am using the ImageViewer's Floater feature to allow users to drag an image to a particular location over another image. The floater image is loaded using RasterCodecs. Is there some way, either with the viewer or through the load process, to swap the floater image's white data with transparency?
Thanks
#2
Posted
:
Sunday, May 17, 2015 6:43:43 AM(UTC)
Groups: Registered, Tech Support
Posts: 26
There's no direct way to make the white area of the image transparent using Floater. One solution would be to add an alpha channel to the image in which to specify the white areas as transparent. You can read more about creating an alpha channel in the help topic "CreateAlphaImage Method"
There's a code sample in the forum post titled "Convert single-color transparency to alpha transparency in PNG C#" which relies on the image having a transparent color.
The sample can be found here:
http://support.leadtools.com/SupportPortal/CS/forums/28319/showpost.aspx
Based on your description, it doesn't appear your image has such a color, but the idea is the same. The only difference is that you'll define your Alpha channel based on the hardcoded color value of white instead of using the Transparent color stored in the image itself.
Faris Shahin
Developer Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Tuesday, June 9, 2015 5:03:44 AM(UTC)
Groups: Registered
Posts: 4
Thank you I was able to find a solution.
LEADTOOLS Support
Imaging
Imaging SDK Questions
ImageViewer with floater - Make white data transparent
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.