[Gimp-user] Image Rotation Auto Center



If you are able to build GIMP from source you could edit the following
lines in function gimp_rotate_tool_prepare() in gimprotatetool.c/.

Change the lines:
tr_tool->trans_info[PIVOT_X] = (gdouble) (tr_tool->x1 + tr_tool->x2)
/ 2.0;
tr_tool->trans_info[PIVOT_Y] = (gdouble) (tr_tool->y1 + tr_tool->y2)
/ 2.0;

to read:

 tr_tool->trans_info[PIVOT_X] = (gdouble) 672;
 tr_tool->trans_info[PIVOT_Y] = (gdouble) 53;

(Ideally the rotate tool would remember the last centre of rotation
(at least for the current session of GIMP) and have a button that you
could use to reset the centre of rotation to the centre of the image).

and when you activate the rotate tool the centre of rotation will be
set as you want it.

Alternatively Ofnuts suggestion 2) (or a variant of it) would be your
best bet. How do you determine the angle of rotation?


Got deflected onto another task for a few days. I will try both these approaches
this week. What I am doing is comparing the hydrodynamic centerline of dolphin
fins.

"How do you determine the angle of rotation?"
Each fin has a unique centerline, but each photo has a rotational bias imposed
by the photographers' technique, environmental conditions and such. Once I
establish the root of the fin and centerline, I paste that as new layer over a
protractor image with a center-point of 53,672 (an artifact of the protractor
image nothing more). Then I use the rotate tool to move the centerline to 40
degrees. The angular correction measured for the line becomes the correction for
the fin photo. With the fin photo rotated it can now be compared fin-to-fin with
other images corrected in a similar way.

-- 
Stratos (via www.gimpusers.com/forums)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]