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 : Wednesday, August 12, 2009 12:25:30 AM(UTC)

pkamat  
pkamat

Groups: Registered
Posts: 9


The setTransperency function takes a int for colouroverlay. So how do i convert RGB to int?

                    overlayProcessor.OverlayImageFileName = "C:\overlay.bmp";
                    overlayProcessor.set_Region(LMVVOvLyLib.LayerTypeConstants.LAYERTYPE_OVERLAYIMAGE,
                        LMVVOvLyLib.RegionConstants.REGION_RECT);
                    overlayProcessor.set_Region(LMVVOvLyLib.LayerTypeConstants.LAYERTYPE_OVERLAYIMAGE,
                        LMVVOvLyLib.RegionConstants.REGION_RECT);

                    overlayProcessor.set_EnableTransparency(LMVVOvLyLib.LayerTypeConstants.LAYERTYPE_OVERLAYIMAGE, true);
                    overlayProcessor.set_TransparentColor(LMVVOvLyLib.LayerTypeConstants.LAYERTYPE_OVERLAYIMAGE, 255);

 

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 : Wednesday, August 12, 2009 7:31:06 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

If you want to convert a .NET system color to an integer, use code similar to this:

System.Drawing.Color c = [some color value];
int rgbVal = c.ToArgb();
int colorVal = ((rgbVal & 0xFF) * 0x10000 + (rgbVal & 0xFF00) + (rgbVal & 0xFF0000) / 0x10000);

 
#3 Posted : Wednesday, August 12, 2009 8:13:34 AM(UTC)

pkamat  
pkamat

Groups: Registered
Posts: 9


thank you dude.. guess it doesnt support a range of value, like 175 to 255.
 
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-2020, Yet Another Forum.NET
This page was generated in 0.111 seconds.