Damien Dunlop on  wrote...
|                                > 
| > >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.
| 
| > convert  A.gif -gravity South -background White -splice 0x30 
| > -pointsize 20 -draw "text 0,5 'Fig 33.'" B.gif
| 
| Yes, you can centralise by working out the height of the text
| (there seems to be a surprising difference in heights of
| fonts for the same point size - but maybe that is my optical
| illusion) then placing the text appropriately. However I
| was looking for automatic centralising of height, such as
| with `-gravity center'. But the latter centres on the height
| of the entire image, not the label area.
| 
Also see...   Centered Append...
   http://imagemagick.org/Usage/layers/#append

Create the label, and append it with centering.

And yes this is another 'hack'.

Real justified append (left, right, center) has been on the ToDo list
for a long time.



  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
  "I've decided I don't want to be a manager. Every time you try to be
  responsive to your employees, they say you're being reactive and not
  proactive. And when you try to be proactive, they accuse you of being
  capricious and arbitrary. So I don't wanna be a manager... " -- Larry Wall
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to