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, September 28, 2011 3:48:59 AM(UTC)
rajknoida

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);
 

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, September 28, 2011 4:24:34 AM(UTC)
rkishore

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)
Maen Hasan

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)
rkishore

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
 
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-2024, Yet Another Forum.NET
This page was generated in 0.064 seconds.