Suggestion: Maximum pointsize for captions

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Suggestion: Maximum pointsize for captions

Post by fmw42 »

As I recall, as of


IM 6.6.2.7 or higher

convert \( -size 160x -background lightblue -fill white label:"TESTING" \) \
-verbose info:

Properties:
date:create: 2010-06-18T09:30:21-07:00
date:modify: 2010-06-18T09:30:21-07:00
label: TESTING
label:pointsize: 35

signature: 3c5ccc42fa207dac992b84878074c919a9d3c9eaebc39d3d101001407fbef0be


This should perhaps also be done for caption: (and? pango:). For caption:, it does show caption: TESTING, but it does not show the pointsize.
Markster
Posts: 6
Joined: 2013-08-31T13:22:51-07:00
Authentication code: 6789

Re: Suggestion: Maximum pointsize for captions

Post by Markster »

fmw42 wrote:One possible solution to snibgo's suggestion would either to have it be part of the information returned when adding -verbose to the caption: command line or to have a new string format [caption:pointsize].

With regard to the former request, that might be implemented by a -define caption:max-pointsize and a -define caption:min-pointsize or some combined way.

I don't think it would make things quicker. IM would have to find its optimal solution and test against the min and max values an override them with on or the other, if too large or too small.

If implemented, it should be done for each of caption:, label: and pango:
Well it would be great if it can be done. I don't know what solution it currently uses to find the optimum solution, I will have to try this debug to see what it does. I would assume it tries to narrow down on the optimal pointsize by trying different sizes and checking boundary. If so, it should never try outside the Min or Max (if provided). If it tries the MAX and it fits, it should stop right there.

If it tries the MIN and it does NOT fit, it should stop right there. I would assume by having these boundaries it would certainly assist the process vs. hindering it.

While using the debug will assist for now in ensuring it is not OVER or UNDER the size I need, it means adding additional time to the process which is already long, as I will "now" need to render one more time in the override size.
Post Reply