How to Left align Text on labels in montage?

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
MichaelJordan
Posts: 1
Joined: 2012-07-03T13:26:45-07:00
Authentication code: 13

How to Left align Text on labels in montage?

Post by MichaelJordan »

So i am trying to create a montage of multiple check images. I want to create text under each image of the pertinent info of each check.

I am using montage, but using label within this only creates centered text. I have tried using gravity, but this only seems to affect the images, and not the text underneath them. Any ideas?

I have also tried using the label parameter on each check, using convert, before going into the montage step. This only creates issues with resizing during the montage portion. Any help would be greatly appreciated.


MJ
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to Left align Text on labels in montage?

Post by fmw42 »

I don't think montage will allow anything but center aligned text. However, you can do most of the framing and labelling ahead of time and then feed the results to montage.

Image

Image

convert zelda3.png lena2.png -set filename:fname "%t" \
-bordercolor SkyBlue -mattecolor DodgerBlue -frame 3x3+0+3 \
-gravity South -background Skyblue -splice 0x15 -font Arial -pointsize 12 \
-gravity southwest -annotate +2+0 "%[filename:fname]" \
-frame 6x6+3+0 miff:- | montage -background none -geometry +2+2 - montage_test.png

Image

see
http://www.imagemagick.org/Usage/crop/#frame
http://www.imagemagick.org/Usage/files/#read_meta
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to Left align Text on labels in montage?

Post by anthony »

The Future...
Eventually I want to be able to generate montage like 'grids' of images from "magick" command (The IMv7 "convert" replacement). Not just grids, but lines of variable sized images, or columns, or other 'packing' or 'layout' methods.

Currently "convert" is limited to using '-append', or by using some heavy processing, 'image layering' to layout images.

We have seen some recent examples of advanced programmed positioning images in a grid using -set page and some knowledge of the image tile size.

See topic...Re: splice (adding tile gridding gaps)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply