mohamadDev / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

RotateBicubic rotates wrong direction. #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I was using the RotateBicubic class.
2. Rotate using a negative angle.

What is the expected output? What do you see instead?
The image rotated counter clockwise rather than clockwise. 
RotateNearestNeighbor and RotateBilinear both rotate clockwise with a 
negative angle, so this was an inconsistency.

What version of the product are you using? On what operating system?
Latest version under source control. Vista.

Please provide any additional information below.

This is the line of code I changed to fix it.
Should be around line 122.
//Fixed because -angle should rotate clockwise
//dx = ox - (double) ox1;
//dy = oy - (double) oy1;
dx = (double)ox1 - ox;
dy = (double)oy1 - oy;

Original issue reported on code.google.com by MichaelL...@gmail.com on 13 Oct 2008 at 3:36

GoogleCodeExporter commented 9 years ago
There must be some sort of confusion. All 3 rotation filters rotate in the same 
direction, which counterclockwise.  The counterclockwise was chosen 
intentionally – 
filter accepts angle in polar coordinates system (actually in Cartesian system 
angles are measured also in counterclockwise direction).

Original comment by andrew.k...@gmail.com on 4 Nov 2008 at 7:38