[Digikam-devel] freerotation autocrop

Gilles Caulier caulier.gilles at free.fr
Thu Jul 21 09:08:19 BST 2005


Le Mercredi 20 Juillet 2005 07:35 PM, Renchi Raju a écrit :
> On Wed, 20 Jul 2005, Renchi Raju wrote:
> > gilles, the code here shows how to do autocrop on freerotation:
> >
> > http://pooh.tam.uiuc.edu/digikam/freerotation.tar.bz2
> >
> > you might have to do some adjustments for negative angles.
>
> updated tarball to handle negative angles correctly.
>

Your auto-crop method is simple but cannot be used to high rotation angle 
value. You crop the image not at the limit of rotated image border. 

This choose isn't optimum but is enough if angle is small. This case is 
generally true in photograph rotation correction and your method works fine. 
I had added this method in current Free Rotation plugin implementation.

I have worked since 2 days to provide an optimized solution without sucess 
(:=))) . To calculate the efficient position of cropped area like describe 
before, there are complex trigonometric operations to do.

If there is a mathematician in this room, you can try to solve this geometric 
problem (:=)))

-- 
Gilles Caulier



More information about the Digikam-devel mailing list