Commit 11b86af15 for imagemagick.org
commit 11b86af154dfcd53bbefb136afe26787ecdd62fd
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sat Jul 11 06:40:30 2026 -0400
if compare:virtual-pixels is present and false then min bounds
diff --git a/MagickCore/compare-private.h b/MagickCore/compare-private.h
index 30989deb5..633d712f7 100644
--- a/MagickCore/compare-private.h
+++ b/MagickCore/compare-private.h
@@ -30,18 +30,17 @@ extern "C" {
static inline void SetImageCompareBounds(const Image *image,
const Image *reconstruct_image,size_t *columns,size_t *rows)
{
- const char
- *artifact;
-
- *columns=MagickMax(image->columns,reconstruct_image->columns);
- *rows=MagickMax(image->rows,reconstruct_image->rows);
- artifact=GetImageArtifact(image,"compare:virtual-pixels");
- if ((artifact != (const char *) NULL) &&
- (IsStringTrue(artifact) == MagickFalse))
+ const char *artifact = GetImageArtifact(image,"compare:virtual-pixels");
+ MagickBooleanType vp = (artifact != (const char *) NULL) ?
+ IsStringTrue(artifact) : MagickFalse;
+ if (vp == MagickFalse)
{
*columns=MagickMin(image->columns,reconstruct_image->columns);
*rows=MagickMin(image->rows,reconstruct_image->rows);
+ return;
}
+ *columns=MagickMax(image->columns,reconstruct_image->columns);
+ *rows=MagickMax(image->rows,reconstruct_image->rows);
}
#if defined(__cplusplus) || defined(c_plusplus)