mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
fix caption sizing issue (https://github.com/ImageMagick/ImageMagick/issues/7004)
This commit is contained in:
+7
-7
@@ -284,14 +284,14 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
|
||||
draw_info->interline_spacing+draw_info->stroke_width+0.5);
|
||||
if ((image->columns != 0) && (image->rows != 0))
|
||||
{
|
||||
if ((width > image->columns) || (height > image->rows))
|
||||
if ((width >= image->columns) && (height >= image->rows))
|
||||
break;
|
||||
if ((width <= image->columns) && (height <= image->rows))
|
||||
if ((width < image->columns) && (height < image->rows))
|
||||
low=draw_info->pointsize;
|
||||
}
|
||||
else
|
||||
if (((image->columns != 0) && (width > image->columns)) ||
|
||||
((image->rows != 0) && (height > image->rows)))
|
||||
if (((image->columns != 0) && (width >= image->columns)) ||
|
||||
((image->rows != 0) && (height >= image->rows)))
|
||||
break;
|
||||
}
|
||||
high=draw_info->pointsize;
|
||||
@@ -317,14 +317,14 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
|
||||
draw_info->interline_spacing+draw_info->stroke_width+0.5);
|
||||
if ((image->columns != 0) && (image->rows != 0))
|
||||
{
|
||||
if ((width <= image->columns) && (height <= image->rows))
|
||||
if ((width < image->columns) && (height < image->rows))
|
||||
low=draw_info->pointsize+0.5;
|
||||
else
|
||||
high=draw_info->pointsize-0.5;
|
||||
}
|
||||
else
|
||||
if (((image->columns != 0) && (width <= image->columns)) ||
|
||||
((image->rows != 0) && (height <= image->rows)))
|
||||
if (((image->columns != 0) && (width < image->columns)) ||
|
||||
((image->rows != 0) && (height < image->rows)))
|
||||
low=draw_info->pointsize+0.5;
|
||||
else
|
||||
high=draw_info->pointsize-0.5;
|
||||
|
||||
+8
-8
@@ -221,14 +221,14 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
|
||||
draw_info->stroke_width+0.5);
|
||||
if ((image->columns != 0) && (image->rows != 0))
|
||||
{
|
||||
if ((width > image->columns) || (height > image->rows))
|
||||
if ((width >= image->columns) && (height >= image->rows))
|
||||
break;
|
||||
if ((width <= image->columns) && (height <= image->rows))
|
||||
if ((width < image->columns) && (height < image->rows))
|
||||
low=draw_info->pointsize;
|
||||
}
|
||||
else
|
||||
if (((image->columns != 0) && (width > image->columns)) ||
|
||||
((image->rows != 0) && (height > image->rows)))
|
||||
if (((image->columns != 0) && (width >= image->columns)) ||
|
||||
((image->rows != 0) && (height >= image->rows)))
|
||||
break;
|
||||
}
|
||||
if (status == MagickFalse)
|
||||
@@ -240,7 +240,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
|
||||
}
|
||||
high=draw_info->pointsize;
|
||||
}
|
||||
while((high-low) > 0.5)
|
||||
while ((high-low) > 0.5)
|
||||
{
|
||||
draw_info->pointsize=(low+high)/2.0;
|
||||
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
|
||||
@@ -256,14 +256,14 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
|
||||
draw_info->stroke_width+0.5);
|
||||
if ((image->columns != 0) && (image->rows != 0))
|
||||
{
|
||||
if ((width <= image->columns) && (height <= image->rows))
|
||||
if ((width < image->columns) && (height < image->rows))
|
||||
low=draw_info->pointsize+0.5;
|
||||
else
|
||||
high=draw_info->pointsize-0.5;
|
||||
}
|
||||
else
|
||||
if (((image->columns != 0) && (width <= image->columns)) ||
|
||||
((image->rows != 0) && (height <= image->rows)))
|
||||
if (((image->columns != 0) && (width < image->columns)) ||
|
||||
((image->rows != 0) && (height < image->rows)))
|
||||
low=draw_info->pointsize+0.5;
|
||||
else
|
||||
high=draw_info->pointsize-0.5;
|
||||
|
||||
Reference in New Issue
Block a user