Caption no longer works

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Caption no longer works

Post by fmw42 »

If you have Pango on your system, you may have to compile IM without it to get caption: to work. Add --without-pango to your ./configure command. See the posts above. Seems like it does now work unless you have a version of Pango higher than what is available from MacPorts (or perhaps it is a Mac issue). I had the same problem as discussed above and just disabled pango and it worked fine. If you have Pango 1.29.4 or higher then it should work as magick had reported above. If you do have that version of Pango or higher and it still does not work, then report back here. Last time I installed Pango from Macports it was only 1.28.4 and that did not seem to allow caption to work on my Mac.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Caption no longer works

Post by fmw42 »

Caption: for those using Pango now seems to be working properly and not give a blank output image in IM 6.7.5.1 Q16 Mac OSX Snow Leopard with Pango 1.28.4
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Caption no longer works

Post by anthony »

fmw42 wrote:Caption: for those using Pango now seems to be working properly and not give a blank output image in IM 6.7.5.1 Q16 Mac OSX Snow Leopard with Pango 1.28.4
Yes Magick was able to find the fault and fix it. However while pango is working, it does not handle other colors.

This is my current pango testing text
https://dl.dropbox.com/u/9500683/pango_test.txt
Which should produce this.

Code: Select all

pango-view -q --dpi=72 -o pango_test_good.png --markup pango_test.txt 
Image

But caption: produces this

Code: Select all

convert -define caption:markup=true caption:"`cat pango_test.txt`" pango_test_bad.png
Image
ASIDE: the "caption:@filename" syntax also is also not working for pango markup.

So it is almost right, but not quite there yet.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Caption no longer works

Post by fmw42 »

Thanks Anthony. My test was too simple with only black letters on white background. So never saw the color issue.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Caption no longer works

Post by anthony »

The main problem I have with pango markup is that justification is an all or nothing action.
That is center all lines, or none of the lines, You can not for example center a title or one paragraph.
Or at least I have found not recode of it in the two descriptions of the markup language.

This 'all justification' should be done in IM using
-define caption:justify=center
But that also is not working yet (nor is -gravity)

As I said I think I would have preferred pango markup to have been a separate coder to caption:

The other lesser problem is while 'TAB' characters can be used in pango text, and it is understood.
You can not set the tab spacing width, so you can not create tables easily in pango markup,

Both problems are however solvable using the pango API, just not the markup which is more for complex 'label' or 'caption' type generation, just as IM is using it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Caption no longer works

Post by magick »

caption:justify requires 0, 1, true, or false. It does not permit 'center'. Gravity is caption:gravity-hint which allows 'natural', 'strong', or 'line'.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Caption no longer works

Post by anthony »

magick wrote:caption:justify requires 0, 1, true, or false. It does not permit 'center'. Gravity is caption:gravity-hint which allows 'natural', 'strong', or 'line'.
I see something that was not explained in the markup documents I saw. Pango is after all more API oriented.

I'll do more experimentation.

Okay caption:justify is for 'justification' of long paragraphs (with a -size Wx)
More research for gravity-hint
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply