I've got a problem when rotating an image by 180°the image effectively rotate by 180°but the Page does not rotate by 180°, instead it rotate by 90°.
After some investigation in the source code I think that I found the source of the problem.
On a rotation of 180° the function that perform the actual rotation is "IntegralRotateImage" MagicCore/shear.c.
A rotation of 180° is transformed in a "rotation" of "2" when passed to "IntegralRotateImage".
In the body of the function there is a switch on the variable "rotation", in the case where "rotation == 2" we find the following code
Code: Select all
case 2:
{
register ssize_t
y;
/*
Rotate 180 degrees.
*/
Here come the problem at the end of the case we find the following code:
Code: Select all
Swap(page.width,page.height);
Swap(page.x,page.y);
I hope that this will be able to help you solve the problem