[SOLVED] -pointsize operator does not work

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
cotcot

[SOLVED] -pointsize operator does not work

Post by cotcot »

I am trying out the example from http://www.imagemagick.org/Usage/text/.

Code: Select all

convert -background lightblue -fill blue  -font Palatino-Italic \
          -size 1920x1080 -pointsize 24 label:Anthony     label_size.gif
This gives me an image of 1920 x 1080 pixels with the text justified over the full width. I expected (as the example in the documentation shows) text with small letter in the upper left corner. I looks like the -pointsize instruction is not accepted.

Can anybody help me ?

I run image magick 6.5.4 under ubuntu jaunty on a amd64 box.

Thanks
Last edited by cotcot on 2009-08-07T09:05:57-07:00, edited 1 time in total.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: -pointsize operator does not work

Post by Bonzo »

It works Ok on Windows with Im 6.5.4 altough I changed the font to Arial as I do not have Palatino-Italic installed.

Try it all on one line and see what happens:

Code: Select all

convert -background lightblue -fill blue -font Palatino-Italic -size 1920x1080 -pointsize 24 label:Anthony label_size.gif
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -pointsize operator does not work

Post by fmw42 »

You have bad space characters in your command line. After I zapped gremlins in your text, it worked fine for me. I also did not have your font, so changed to something more common. Perhaps your Palatino-Italics is not ttf.

Try this

convert -background lightblue -fill blue -font Helvetica -size 1920x1080 -pointsize 24 label:Anthony label_size.gif
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: -pointsize operator does not work

Post by anthony »

This ability to use BOTH -size and -pointsize together was only added recently! That is in IM v6.5.2-4.

The warning on the "Text to Image Handling" section of IM examples
says...
Before version 6.5.2-4, IM would completely ignore the "-pointsize" setting if a "-size" setting is also given. This causes the text to be auto-sized to 'best fit' the size given.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
cotcot

Re: -pointsize operator does not work

Post by cotcot »

Made an error in previous post. Version 6.4.5 was installed.
The space was not the problem.
I compiled 6.5.4.9 and now it is working.

Thanks for all of you who replied my post.
Post Reply