ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 DeSkew a parallelogram
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Waheed

Kuwait
36 Posts

Posted - May 04 2021 :  12:00:25  Show Profile  Reply
Is there a single statement to change a parallelogram shape to a rectangle. Assuming I know the skew angle (15 degrees)?


I'm aware of this procedure:
procedure RotateAndCrop(Angle: Double; AntiAliasMode: TIEAntialiasMode = ierFast; Rate: Double = 1.3; CropAlgorithm: TIECropAlgorithm = iecaSkewedDocument);


but I don't want to crop the image.


-----------------
3 Monitors
Windows 10
Delphi 6,2007 and 10.2
ImageEn v.9


xequte

39052 Posts

Posted - May 04 2021 :  17:14:42  Show Profile  Reply
Hi Waheed

Do an equilateral crop using the four corners of the parallelogram:

https://www.imageen.com/help/TImageEnProc.Crop.html

e.g. if your parallelogram is 500 wide and 400 high and offset is 50:

ImageEnView1.Proc.Crop([DPoint(50, 0), DPoint(500, 0), DPoint(450, 400), DPoint(0, 400)]);





Nigel
Xequte Software
www.imageen.com

Go to Top of Page

Waheed

Kuwait
36 Posts

Posted - May 07 2021 :  09:03:31  Show Profile  Reply
Is this drawing correct?

ImageEnView1.Proc.Crop([DPoint(x1, y1), DPoint(x2, y2), DPoint(x3, y3), DPoint(x4, y4)]);



-----------------
3 Monitors
Windows 10
Delphi 6,2007 and 10.2
ImageEn v.9
Go to Top of Page

xequte

39052 Posts

Posted - May 07 2021 :  15:56:50  Show Profile  Reply
Yes, that is correct.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: