Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, May 14, 2015 10:38:56 AM(UTC)

csa_dev  
csa_dev

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
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, May 17, 2015 6:48:43 AM(UTC)
Faris Shahin

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.

LEAD Logo
 
#3 Posted : Tuesday, June 9, 2015 5:08:44 AM(UTC)

csa_dev  
csa_dev

Groups: Registered
Posts: 4


Thank you I was able to find a solution.
 
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.

Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.098 seconds.