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, January 28, 2009 10:59:03 PM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


hello,

      My application is a windows based application using c#.net 2008 and .net framework is 3.3 and also use leadtools version 16. My applicaion , have one

rasterimageviewer,its for display the particular image.In my application it is working fine and display image.I want to set the white boreder color  around the image,can i do it

regards

ssskkk

 

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 : Thursday, January 29, 2009 1:21:57 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Ssskkk,

You can do this by creating a white background image larger than the original image, and then combine the original image with the white background image as follows:
+-------+
RasterImage SrcImage, backImage;
RasterCodecs _codecs;

_codecs = new RasterCodecs();

SrcImage = _viewerBefore.Image.Clone();

backImage = new RasterImage(RasterMemoryFlags.Conventional, SrcImage.Width + 50, SrcImage.Height + 50, 24, RasterByteOrder.Bgr, RasterViewPerspective.TopLeft, null, IntPtr.Zero, 0);

FillCommand Fill = new FillCommand();
Fill.Color = new RasterColor(Color.White);
Fill.Run(backImage);

CombineCommand Combine = new CombineCommand();
Combine.DestinationRectangle = new Rectangle(25, 25, SrcImage.Width, SrcImage.Height);
Combine.SourcePoint = new Point(0, 0);
Combine.SourceImage = SrcImage;
Combine.Run(backImage);

_viewerAfter.Image = backImage.Clone();
+-------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Friday, January 30, 2009 1:40:58 AM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


hello,

               I dont want to set the  white Background Color and set the white border color of rasterimageviewr.

regards

sssskkk

 
#4 Posted : Saturday, January 31, 2009 10:27:58 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

The code that I sent to you creates a white backround image larger than the original image and then combines the original image with the white image to create a white border around the original image.

Did you try the code that I sent to you?
If yes, what was the result?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Sunday, February 1, 2009 6:45:33 PM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


hello

 I tried the code you sent to me. Its working, But I want

1) Display The image.

2) Around the image, a white border color is needed to show

and

3)Beyond the White border Color, a Black Background Color is needed.

this all three are needed for my requirement.

regards

ssskkk

 

 
#6 Posted : Monday, February 2, 2009 1:03:06 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

We don't have a direct way to add a border around the image. The only way to do this is by using the combine method with a white background image.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#7 Posted : Monday, February 2, 2009 1:17:24 AM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


hello,

Using the combine method, can i accomplish the above requirements.

regards

ssskkk

 
#8 Posted : Monday, February 2, 2009 2:53:57 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

(1) To add a white border around the original image, you need to create a white image larger than the original image, and then combine the original image with the white image (please check the code that I sent you).

(2) If you need a black background under the White border image, you need to combine the result image from step 1 with a large black background image.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#9 Posted : Monday, February 2, 2009 10:54:12 PM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


hello,

Please give me the full code

 
#10 Posted : Monday, February 2, 2009 11:06:33 PM(UTC)

ssskkk  
ssskkk

Groups: Registered
Posts: 74


hello,

I dont want the code.

now it is working fine

 thank you very much.

 
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.080 seconds.