I "upgraded" by installing the latest (6.9.1-2) ImageMagick suite (from source) on my Ubuntu 14.04.2 but find that commmands now produce different results.
In particular, in version 6.7.7-10 command
convert -size x200 -font Arial -pointsize 20 -gravity NorthWest \
label:"The quick brown fox jumps over the lazy dog" testing.png
produced the desired image, one with a line of text of fixed font size having white space below to fill the specified width.
But in version 6.9.1-2 the specified pointsize seems to have no effect, the font expanding in size vertically such that the specified width is always filled. Is this a bug? So far (I spent an entire afternoon on this) I have been unable to find a argument combination which produces an image ala the one produced by the previous version.
pointsize not fixed in newer version
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: pointsize not fixed in newer version
I think the lack of a specified width causes the problem.
I have supplied a generous width, then trimmed it. This trims all four sides, so I extend the height to the required 200.
Code: Select all
convert -size 10000x200 -font Arial -pointsize 20 -gravity NorthWest \
label:"The quick brown fox jumps over the lazy dog" -trim +repage \
-gravity center -extent x200 t.png
snibgo's IM pages: im.snibgo.com
Re: pointsize not fixed in newer version
Thanks for your response - I'd never have figured out that workaround on my own, since it uses more detailed IM knowledge than I have (I did not know about the "extent" argument). FYI when extending that to my more complex operational case, which uses multiple appends, I found that the initial "-size" declaration caused problems - but when that was omitted it worked.
Still unanswered is whether this is a bug. To me it is, since the specified pointsize is ignored (and since it was _not_ ignored in previous versions)
Still unanswered is whether this is a bug. To me it is, since the specified pointsize is ignored (and since it was _not_ ignored in previous versions)
Re: pointsize not fixed in newer version
Hmm - after writing the above, it occurred to me that if the "-size" was not necessary then perhaps the "-trim" and "+repage" arguments were not needed either, so I just tried omitting them and it still worked - so the "-extent" is the key.