diff --git a/MagickCore/attribute.c b/MagickCore/attribute.c index eed5b57571..323c625d2b 100644 --- a/MagickCore/attribute.c +++ b/MagickCore/attribute.c @@ -421,8 +421,8 @@ MagickExport RectangleInfo GetImageBoundingBox(const Image *image, artifact=GetImageArtifact(image, "trim:edges"); if (artifact == (const char *) NULL) { - bounds.width=0; - bounds.height=0; + bounds.width=image->columns == 1 ? 1 : 0; + bounds.height=image->rows == 1 ? 1 : 0; bounds.x=(ssize_t) image->columns; bounds.y=(ssize_t) image->rows; }