From 0b896119d40039387661110cc419a3db7b0c4778 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 13 Aug 2014 17:44:29 +0100 Subject: [PATCH] fix similarity rotate + scale thanks Topochicho see https://github.com/jcupitt/libvips/issues/154 --- ChangeLog | 3 ++- libvips/resample/similarity.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a65488b..f58d25df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ -12/8/14 started 7.40.5 +12/8/14 started 7.40.6 - more doc fixes +- fix similarity rotate+scale, thanks Topochicho 25/7/14 started 7.40.5 - fix a race in im_maxpos_avg() diff --git a/libvips/resample/similarity.c b/libvips/resample/similarity.c index ffdb8ff2..30feefd8 100644 --- a/libvips/resample/similarity.c +++ b/libvips/resample/similarity.c @@ -6,6 +6,8 @@ * 25/10/13 * - oops, reverse rotation direction to match the convention used in the * rest of vips + * 13/8/14 + * - oops, missing scale from b, thanks Topochicho */ /* @@ -82,7 +84,7 @@ vips_similarity_build( VipsObject *object ) return( -1 ); a = similarity->scale * cos( VIPS_RAD( similarity->angle ) ); - b = -sin( VIPS_RAD( similarity->angle ) ); + b = similarity->scale * -sin( VIPS_RAD( similarity->angle ) ); c = -b; d = a;