From 3228ce04947037f8702cabe7b569c09445c9fb41 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 16 Dec 2018 14:50:57 -0500 Subject: [PATCH] ... --- MagickCore/enhance.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index 2f77da13c..2d59b0641 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -504,8 +504,8 @@ static MagickBooleanType CLAHE(const RectangleInfo *clahe_info, */ assert((clahe_info->width % clahe_info->x) == 0); assert((clahe_info->height % clahe_info->y) == 0); - assert(clahe_info->x < MaxCLAHETiles); - assert(clahe_info->y < MaxCLAHETiles); + assert(clahe_info->x <= MaxCLAHETiles); + assert(clahe_info->y <= MaxCLAHETiles); assert(range_info->max < NumberCLAHEGrays); assert(range_info->min < range_info->max); assert((clahe_info->x >= 2) || (clahe_info->y >= 2)); @@ -674,13 +674,13 @@ MagickExport MagickBooleanType CLAHEImage(Image *image,const size_t width, if (clahe_info.x < 2) clahe_info.x=2; else - if (clahe_info.x >= MaxCLAHETiles) + if (clahe_info.x > MaxCLAHETiles) clahe_info.x=MaxCLAHETiles; clahe_info.y=(ssize_t) (image->rows/(height == 0 ? 1 : height)); if (clahe_info.y < 2) clahe_info.y=2; else - if (clahe_info.y >= MaxCLAHETiles) + if (clahe_info.y > MaxCLAHETiles) clahe_info.y=MaxCLAHETiles; clahe_info.width=((image->columns+clahe_info.x-1)/clahe_info.x)*clahe_info.x; clahe_info.height=((image->rows+clahe_info.y-1)/clahe_info.y)*clahe_info.y; -- 2.40.0