From: anthony Date: Sun, 3 Oct 2010 06:16:09 +0000 (+0000) Subject: Output Scaling of Horizon anti-aliasing in Perspective Distortions X-Git-Tag: 7.0.1-0~8766 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c43782df7dd06579c309a16384c1d35657c7891;p=imagemagick Output Scaling of Horizon anti-aliasing in Perspective Distortions --- diff --git a/ChangeLog b/ChangeLog index 230b41ae5..32f3be346 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ However it is still a very blury filter for default use in EWA. * Adjusted Variable Mapping Blur Composition so user arguments actual relate properly to the sigma of the blur for a maximum mapping value. + * Fix horizon anti-alising for output scaled perspective distortions. 2010-09-28 6.6.4-8 Nicolas Robidoux * Chantal Racette double checked the bounding parallelogram computation diff --git a/magick/distort.c b/magick/distort.c index aacc3a106..b67ed22d1 100644 --- a/magick/distort.c +++ b/magick/distort.c @@ -2062,11 +2062,11 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method, abs_c6 = fabs(coeff[6]); abs_c7 = fabs(coeff[7]); if ( abs_c6 > abs_c7 ) { - if ( abs_r < abs_c6 ) - validity = 0.5 - coeff[8]*r/coeff[6]; + if ( abs_r < abs_c6*output_scaling ) + validity = 0.5 - coeff[8]*r/(coeff[6]*output_scaling); } - else if ( abs_r < abs_c7 ) - validity = 0.5 - coeff[8]*r/coeff[7]; + else if ( abs_r < abs_c7*output_scaling ) + validity = 0.5 - coeff[8]*r/(coeff[7]*output_scaling); /* Perspective Sampling Point (if valid) */ if ( validity > 0.0 ) { /* divide by r affine, for perspective scaling */ @@ -2614,7 +2614,7 @@ MagickExport Image *SparseColorImage(const Image *image, break; } case ShepardsColorInterpolate: - { /* Shepards Method,uses its own input arguments as coefficients. + { /* Shepards Method, uses its own input arguments as coefficients. */ size_t k;