mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
fix boundary condition when resampling pixel color (https://github.com/ImageMagick/ImageMagick/issues/7415)
This commit is contained in:
@@ -598,11 +598,11 @@ MagickExport MagickBooleanType ResamplePixelColor(
|
||||
weight = 0.0;
|
||||
#if FILTER_LUT
|
||||
/* Note that the ellipse has been pre-scaled so F = WLUT_WIDTH */
|
||||
if ((Q >= 0.0) && ((int) Q < WLUT_WIDTH)) {
|
||||
weight = resample_filter->filter_lut[(int)Q];
|
||||
if (((int) Q >= 0) && ((int) Q < WLUT_WIDTH)) {
|
||||
weight = resample_filter->filter_lut[(int) Q];
|
||||
#else
|
||||
/* Note that the ellipse has been pre-scaled so F = support^2 */
|
||||
if ((Q >= 0.0) && (Q < (double)resample_filter->F)) {
|
||||
if ((Q >= 0.0) && (Q < resample_filter->F)) {
|
||||
weight = GetResizeFilterWeight(resample_filter->filter_def,
|
||||
sqrt(Q)); /* a SquareRoot! Arrggghhhhh... */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user