From 3dce5951c228fe94e2b897f6a499c1d37b24e419 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 25 Oct 2013 12:56:24 +0100 Subject: [PATCH] reverse similarity rotation direction convention The rest of vips uses +ve-is-clockwise convention, like almost all image processing packages. The new similarity operator was mistakenly using the mathematical +ve-is-anticlockwise convention, oops. --- ChangeLog | 2 ++ libvips/resample/similarity.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 23dfb8c6..72160452 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 18/10/13 started 7.36.3 - fix compiler warnings in ubuntu 13.10 +- reverse similarity rotation direction to match the convention used + elsewhere in vips 10/10/13 started 7.36.2 - better jpeg startup diff --git a/libvips/resample/similarity.c b/libvips/resample/similarity.c index bffc2ba4..ffdb8ff2 100644 --- a/libvips/resample/similarity.c +++ b/libvips/resample/similarity.c @@ -3,6 +3,9 @@ * * 3/10/13 * - from similarity.c + * 25/10/13 + * - oops, reverse rotation direction to match the convention used in the + * rest of vips */ /* @@ -79,7 +82,7 @@ vips_similarity_build( VipsObject *object ) return( -1 ); a = similarity->scale * cos( VIPS_RAD( similarity->angle ) ); - b = sin( VIPS_RAD( similarity->angle ) ); + b = -sin( VIPS_RAD( similarity->angle ) ); c = -b; d = a;