From 666b0df427b1c4d26342510f1ea5b69a2ac95a9a Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 28 Aug 2018 08:29:32 -0400 Subject: [PATCH] https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=34639 --- coders/caption.c | 2 +- coders/label.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coders/caption.c b/coders/caption.c index e7026a23c..fb839a5e4 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -293,7 +293,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, (void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",MagickMax( draw_info->direction == RightToLeftDirection ? (double) image->columns- metrics.bounds.x2 : -metrics.bounds.x1,0.0),draw_info->gravity == - UndefinedGravity ? metrics.ascent : 0.0); + UndefinedGravity ? MagickMax(metrics.ascent,metrics.bounds.y2) : 0.0); (void) CloneString(&draw_info->geometry,geometry); status=AnnotateImage(image,draw_info,exception); if (image_info->pointsize == 0.0) diff --git a/coders/label.c b/coders/label.c index 523e12b5b..3bf4b8483 100644 --- a/coders/label.c +++ b/coders/label.c @@ -259,7 +259,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info, (void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g", draw_info->direction == RightToLeftDirection ? (double) image->columns- metrics.bounds.x2 : 0.0,draw_info->gravity == UndefinedGravity ? - metrics.ascent : 0.0); + MagickMax(metrics.ascent,metrics.bounds.y2) : 0.0); (void) CloneString(&draw_info->geometry,geometry); status=AnnotateImage(image,draw_info,exception); if (image_info->pointsize == 0.0) -- 2.40.0