LEADTOOLS Support
Document
Document SDK Questions
How to hide the Raster Image in Raster Viewer without hiding the annotations
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, September 28, 2011 3:48:59 AM(UTC)
Groups: Registered
Posts: 20
Hi,
I want to remove background image from raster image viewer on a button click but annotation remains.
i am using following code
RasterCodecs codecs = new RasterCodecs();
Viewer.Image = codecs.Load(ImageFilePath);
#2
Posted
:
Wednesday, September 28, 2011 4:24:34 AM(UTC)
Groups: Registered
Posts: 9
Hi,
I have a TIF loaded in the Raster viewer. I have created a annotation object on top of it. Now I have to hide the raster image without hiding the annotations.
What I want to achieve:
1. TIF image loaded should not be visible only the annotation created on top of it should be visible.
2. The background of the Annotation should be white or any color, but the image loaded shouldn;t be visible.
3. On the button click I want to toggle this functionality.
Thanks and Regards
Raj
#3
Posted
:
Thursday, September 29, 2011 5:47:32 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
You can keep all the annotations visible, and also keep the bitmap's pixel data unchanged, but make them all appear pure white by changing the paint intensity of the image.
Here's code sample:
//Step 1: Save old value in an integer variable
OldIntensity = Viewer.Image.PaintIntensity;
//Step 2: Set the intensity to maximum value to make everything white
Viewer.Image.PaintIntensity = 1000;
When you want to return the display to its previous state, simply return the paint intensity as follows:
Viewer.Image.PaintIntensity = OldIntensity;
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#4
Posted
:
Thursday, September 29, 2011 8:52:24 AM(UTC)
Groups: Registered
Posts: 9
Hi Maen Hasan
Hat's off to u man.. Only person, who always helps me out.
Thanks a lot man.
Regards
Raj
LEADTOOLS Support
Document
Document SDK Questions
How to hide the Raster Image in Raster Viewer without hiding the annotations
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.