LEADTOOLS Support
General
General Questions
How to set transperence colour for Overlays
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, August 12, 2009 12:25:30 AM(UTC)
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);
#2
Posted
:
Wednesday, August 12, 2009 7:31:06 AM(UTC)
Groups: Guests
Posts: 3,022
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)
Groups: Registered
Posts: 9
thank you dude.. guess it doesnt support a range of value, like 175 to 255.
LEADTOOLS Support
General
General Questions
How to set transperence colour for Overlays
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.