OK, then try this!
You have to create a white image with of the same width as your A.gif
with the text centered and then append it to the bottom of A.gif
convert A.gif \
\( -size $((`convert A.gif -format %w info:`))x30 xc:white \
-gravity center -pointsize 20 -annotate 0 "Fig 33." \) \
-append B.gif
> > >Possibly the most common requirement of a caption
>> >is to place it beneath the image. But this does not
>> >appear to be easy. The following lines appraoch
>> >a solution but are not sufficient.
>> >
>> >convert A.gif \
>> > -gravity South\
>> > -background White -splice 0x30 \
>> > -pointsize 20 -annotate 0 \
>> > 'Fig 33.' \
>> > B.gif
>> >
>> >The problem with the above is that it does not automatically
>> >centre the text vertically on the added splice, it places
>> >the baseline on or a little above the bottom of the splice,
>> >which may be nowhere near the centre. I have considered
>> >labels, captions, enclosing options in \(...\) but have not
>> >found a simple solution.
>
>> From: Fred Weinhaus
>>
>> montage -geometry +0+0 -background white -pointsize 20 \
>> -label "Fig 33." A.gif B.gif
>>
>
>This does centre the label nicely, but is not ideal:
>
>a) I should have mentioned I prefer to use convert as it
>is more flexible than montage and so the one command can
>achieve many manipulations without having to resort to
>temporary files, whilst its syntax is more consistent
>with the apparent direction of ImageMagick.
>
>For example:
>
>b) For a pointsize of 14 (which is what I use on many captions),
>the result of the default antialiasing of the text is `terrible'.
>Montage does not seem to accept +antialiasing.
>
>c) There appears to be no control over the height of the background
>to the label.
>
>d) To add a 1 or 2 pixel border under the image and above the label,
>but nowhere else, may be a problem with montage: no -splice option,
>maybe no `line' with -draw option either.
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users