Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Monday, November 24, 2008 2:27:35 PM(UTC)


Groups: Registered
Posts: 1


I´m working with Leadtools v15.

My problem is:

I have some people photos to prepare for identification purpose, this photos and people's information are in paper and photos are glued to the paper. Sometimes the pictures are a little rotated.

What I need is to use a rectangle to frame the photo and rotate if
necessary, for this I am using AnnRectangle the problem is that I can
not find a way to obtain the contents of the rectangle selected and then rotate.


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 : Monday, November 24, 2008 11:13:06 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Actually there is no need to use the AnnRectangle object to frame the photo. You just need to draw a region around the photo and then do the following:
- After drawing the region, get a temp raster image that contains only the photo. You can do this by using the Clone method:
Rectangle Rect = new Rectangle(0, 0, 40, 40);
activeForm.Automation.Viewer.Image.AddRectangleToRegion(null, Rect, RasterRegionCombineMode.Set);
RasterImage Tempimage = activeForm.Automation.Viewer.Image.Clone(Rect);

- Rotate the temp image by using the RotateCommand:
Leadtools.ImageProcessing.RotateCommand cmd = new Leadtools.ImageProcessing.RotateCommand();
cmd.Angle = 90;

- Combine the temp image with the original image using the CombineFastCommand class.

Maen Badwan
LEADTOOLS Technical Support
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.081 seconds.