From 7d8e14899c562157c7760a77fc91625a27cb596f Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 21 Sep 2017 06:52:40 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/771 --- coders/caption.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/caption.c b/coders/caption.c index 1ce258f11..81a637fca 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -209,10 +209,13 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, high, low; + ssize_t + n; + /* Auto fit text into bounding box. */ - for ( ; ; draw_info->pointsize*=2.0) + for (n=0; n < 32; n++, draw_info->pointsize*=2.0) { text=AcquireString(caption); i=FormatMagickCaption(image,draw_info,split,&metrics,&text, -- 2.40.0