-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimagelayout.1
1051 lines (1051 loc) · 25.7 KB
/
imagelayout.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "imagelayout.py" "1" "July 2019" "imagelayout.py v1.0" "Version 1.0"
.hy
.SH NAME
.PP
\f[B]imagelayout\f[R] - arrange images into a large image according to a
layout
.SH SYNOPSYS
.PP
\f[B]imagelayout(.py)\f[R] [\f[B]-w\f[R]|\f[B]--watch\f[R]]
[\f[B]-s\f[R]] [\f[B]-o\f[R] \f[I]outputfile\f[R]] [\f[B]-h|--help\f[R]]
\f[I]configfile\f[R] [\f[I]imagefile\f[R] [\f[I]imagefile\f[R] ...]]
.PP
NOTE: Depending on how you installed the program, the command is either
\f[B]imagelayout.py\f[R] or just \f[B]imagelayout\f[R].
.SH DESCRIPTION
.PP
\f[B]imagelayout\f[R] arranges several images according to a predefined
layout and produces a larger image consisting of the sub-images.
It can optionally label the individual images.
Additional features include the ability to crop and add borders to the
images, to add a border and a title to the final image, and to add
arbitrary labels and lines or arrows to the final image.
The intended use of \f[B]imagelayout\f[R] is the creation of figures
from sub-figures for articles and science publications.
\f[B]imagelayout\f[R] is a command-line Python application guided by a
configuration file \f[I]configfile\f[R] (provided as the only command
line argument); it has no graphical interface or interactive features.
Thus, it is suitable for use in scripts, Makefiles, and automated and
reproducible workflows.
.SH OPTIONS
.IP \[bu] 2
\f[B]-w, --watch\f[R]
.PD 0
.P
.PD
Run once, then watch the configuration file for changes and re-run
whenever a
.PD 0
.P
.PD
change is detected.
This is useful for developing the configuration file and making
adjustments.
\f[B]Tip:\f[R] View the output image file with a viewer that also
watches the image file and reloads it when it changes.
\f[C]qiv\f[R] for Linux systems is such a viewer, e.g.
\f[C]qiv -T out.png\f[R] will reload \f[C]out.png\f[R] as soon as it
changes.
.IP \[bu] 2
\f[B]-s\f[R]
.PD 0
.P
.PD
Report the pixel sizes of input images and exit.
.IP \[bu] 2
\f[B]-o\f[R] \f[I]outputfile\f[R]
.PD 0
.P
.PD
Name of the output image file (optional)
.IP \[bu] 2
\f[B]-h, --help\f[R]
.PD 0
.P
.PD
Display short help message and exit.
.IP \[bu] 2
\f[I]configfile\f[R]
.PD 0
.P
.PD
The configuration file (yaml format)
.IP \[bu] 2
\f[I]imagefile(s)\f[R]
.PD 0
.P
.PD
Optionally, the image files to be used as inputs can be specified here.
.SH DEFINING THE IMAGE LAYOUT
.PP
The desired layout of the images can be defined as a combination of
horizontally and vertically joined images.
Two keywords are used for this in the configuration file.
The \f[C]hjoin\f[R] keyword defines a horizontally joined image
sequence, e.g.
.IP
.nf
\f[C]
layout:
hjoin: [A, B, C]
\f[R]
.fi
.PP
will result in the following image arrangement:
.IP
.nf
\f[C]
+---+---+---+
| A | B | C |
+---+---+---+
\f[R]
.fi
.PP
while the \f[C]vjoin\f[R] keyword produces a vertical arrangement:
.IP
.nf
\f[C]
layout:
vjoin: [A, B, C]
\f[R]
.fi
.PP
will result in this arrangement:
.IP
.nf
\f[C]
+---+
| A |
+---+
| B |
+---+
| C |
+---+
\f[R]
.fi
.PP
More complex layouts can be defined by combining and nesting the
\f[C]hjoin\f[R] and \f[C]vjoin\f[R] specifications.
For example,
.IP
.nf
\f[C]
hjoin:
- vjoin:
- hjoin: [A, B]
- C
- D
\f[R]
.fi
.PP
results in this layout:
.IP
.nf
\f[C]
+---+---+---+
| A | B | |
+---+---+ D |
| C | |
+-------+---+
\f[R]
.fi
.PP
Horizontally joined images will be resized to fit the same height (the
highest image), and vertically joined images will be resized to fit the
same width (the widest image).
If the \f[B]fixedsize\f[R] option is used for an image, it will be
padded rather than scaled.
.SH INPUT AND OUTPUT FILE NAMES
.PP
The names of the input and output image file names can be specified in
the configuration file.
However, to facilitate the use of \f[C]imagelayout.py\f[R] in scripts
and Makefiles, the file names can also be provided on the command line.
.PP
Input file names can be provided on the command line after the
configuration file name.
In this case, you can refer to them in the configuration file as
\f[C]$1\f[R], \f[C]$2\f[R], etc.
For example, if the command line is
.IP
.nf
\f[C]
imagelayout.py config.yaml image1.png image2.jpg image3.png
\f[R]
.fi
.PP
then you can refer to the three input image files in the configuration
file as follows:
.IP
.nf
\f[C]
images:
A: $1
B: $2
C: $3
\f[R]
.fi
.PP
To specify the output file name on the command line, the \f[C]-o\f[R]
option can be used.
In this case, you can refer to it in the configuration file as any
string starting with a \f[C]$\f[R] (a single \f[C]$\f[R] is enough).
For example, if the command line is
.IP
.nf
\f[C]
imagelayout.py -o output.png config.yaml
\f[R]
.fi
.PP
then you refer to the output file in the configuration file as follows:
.IP
.nf
\f[C]
outputfile: $
\f[R]
.fi
.PP
You can use special file names of the format
\f[C]BLANK-\f[R]W\f[C]x\f[R]H, e.g.
\f[C]BLANK-640x480\f[R].
In this case, a blank image will be generated by
\f[C]imagelayout.py\f[R] with the given width and height.
The color of the blank image will be determined by the
\f[C]paddingcolor\f[R] keyword (or white by default).
The blank images can be used as placeholders.
For example, if you have 5 images and you want to arrange them into a
3x2 grid and leave the bottom right cell empty then you can use the
following configuration:
.IP
.nf
\f[C]
images:
A: A.png
B: B.png
C: C.png
D: D.png
E: E.png
blank: BLANK-640x480
layout:
vjoin:
- hjoin: [A, B, C]
- hjoin: [D, E, blank]
\f[R]
.fi
.PP
The resulting image will look like this:
.IP
.nf
\f[C]
+---+---+---+
| A | B | C |
+---+---+---+
| D | E | |
+---+---+---+
\f[R]
.fi
.PP
By default, the identifiers of the blank images will not be displayed in
the final image.
.SH CONFIGURATION FILE
.PP
The only mandatory command line argument to \f[B]imagelayout\f[R] is the
configuration file \f[I]configfile\f[R], which should be written as a
YAML format file, and contains all information about the input/output
files, the layout, and the requested operations.
.PP
The two main mandatory parts of the configuration file are the
\f[B]images\f[R] section and the \f[B]layout\f[R] section; in addition
the output file must also be specified using the \f[B]outputfile\f[R]
keyword.
The simplest configuration file may look something like this:
.IP
.nf
\f[C]
images:
A: imageA.png
B: imageB.png
outputfile: out.png
layout:
hjoin: [A, B]
\f[R]
.fi
.PP
This will produce the file \f[C]out.png\f[R] consisting of
\f[C]imageA.png\f[R] and \f[C]imageB.png\f[R] joined horizontally.
If the
.IP
.nf
\f[C]
labels:
add: yes
\f[R]
.fi
.PP
lines are added then each image will be labeled in the top left corner
with the letters A and B, respectively.
.PP
The configuration file may contain numerous other keywords and options
to specify image labels, font names, font sizes and colors, cropping
images or adding borders to them, adding a title, adding arbitrary
labels, lines, and arrows to the final image.
The detailed list of keywords and options follows.
.PP
\f[B]Note on font names:\f[R] On Linux, the system fonts may be listed
using the \f[C]fc-list\f[R] command.
On Windows, look in the \f[C]\[rs]Windows\[rs]Fonts\f[R] directory.
Use the font file names without the extension (e.g.
\f[C].ttf\f[R]) as font names.
For example, bold Arial is specified in Linux as \f[C]Arial_Bold\f[R]
(assuming the \f[C]msttcorefonts\f[R] package is installed), but on
Windows as \f[C]arialbd\f[R] (as the \f[C]\[rs]Windows\[rs]Fonts\f[R]
directory contains the \f[C]arialbd.ttf\f[R] file).
.SH COMPLETE LIST OF CONFIGURATION FILE OPTIONS
.SS imagelayout yaml configuration file
.IP \[bu] 2
\f[B]inputdir:\f[R] \f[I]\f[BI]directoryname\f[I]\f[R]
.PD 0
.P
.PD
Input directory; input image files will be loaded from here
.IP \[bu] 2
\f[B]images:\f[R]
.PD 0
.P
.PD
Input images are specified here.
Each file must have an identifier, and either a single file name or a
number of parameters.
Note: A file name like \f[C]$1\f[R], \f[C]$2\f[R], etc.
indicates that the file name should be taken from the command line (see
manual).
If the file name is \f[C]BLANK-\f[R]W\f[C]x\f[R]H, e.g.
\f[C]BLANK-640x480\f[R] then a blank image of the given size will be
generated; this can be used as a placeholder; identifiers of blank
images will not be displayed as labels.
.RS 2
.IP \[bu] 2
\f[B]\f[BI]imageid\f[B]:\f[R] \f[B]\f[BI]filename\f[B]\f[R]
.PD 0
.P
.PD
An identifier and a filename.
If you don\[aq]t want to specify any further parameters for the image
other than the filename then this form can be used.
Otherwise, see below.
.IP \[bu] 2
\f[B]\f[BI]imageid\f[B]:\f[R]
.PD 0
.P
.PD
An identifier for an image
.RS 2
.IP \[bu] 2
\f[B]file:\f[R] \f[B]\f[BI]filename\f[B]\f[R]
.PD 0
.P
.PD
Name of the image file
.IP \[bu] 2
\f[B]label:\f[R] \f[B]\f[BI]label\f[B]\f[R]
.PD 0
.P
.PD
A label for the image.
A text string if you don\[aq]t want to specify any parameters such as
position, font, color, etc; in this case the parameters specified in the
toplevel \f[B]labels\f[R] option will be used.
If you want to specify further parameters here then provide a mapping
(see next line).
Optional; if omitted then the image identifier will be used for
labeling.
.IP \[bu] 2
\f[B]label:\f[R]
.PD 0
.P
.PD
A label for the image along with parameters such as position, font, etc.
These parameters will override those given in the toplevel
\f[B]labels\f[R] option.
.RS 2
.IP \[bu] 2
\f[B]text:\f[R] \f[B]\f[BI]labeltext\f[B]\f[R]
.PD 0
.P
.PD
Text of the label; if omitted then the image identifier will be used.
.IP \[bu] 2
\f[B]fontname:\f[R] \f[B]\f[BI]fontname\f[B]\f[R]
.PD 0
.P
.PD
Name of a truetype font available on the system.
Example: \f[C]Arial_Bold\f[R].
.IP \[bu] 2
\f[B]fontsize:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
Font size in pixels.
.IP \[bu] 2
\f[B]fontcolor:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Font color.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
.IP \[bu] 2
\f[B]pos:\f[R]
(\f[B]\f[CB]top\f[B]\f[R]|\f[C]center\f[R]|\f[C]bottom\f[R])\f[C]-\f[R](\f[B]\f[CB]left\f[B]\f[R]|\f[C]center\f[R]|\f[C]right\f[R])
.PD 0
.P
.PD
Position of the label relative to the image.
A combination of the words (\f[C]top\f[R], \f[C]center\f[R],
\f[C]bottom\f[R]) and (\f[C]left\f[R], \f[C]center\f[R],
\f[C]right\f[R]), separated with a dash (no space in between!).
Default: \f[C]top-left\f[R].
.IP \[bu] 2
\f[B]offset:\f[R] \f[B][ \f[BI]xoffset\f[B]\f[R],
\f[B]\f[BI]yoffset\f[B] ]\f[R]
.PD 0
.P
.PD
Offset, in pixels, for the label, relative to the position defined in
\f[B]pos\f[R].
Default: \f[C][0, 0]\f[R]
.RE
.IP \[bu] 2
\f[B]fixedsize:\f[R] \f[B]\f[CB]no\f[B]\f[R] | \f[C]yes\f[R]
.PD 0
.P
.PD
If \f[C]yes\f[R], the image will never be resized during the layout (it
may still be resized along with the final image if the
\f[B]finalwidth\f[R] or \f[B]finalheight\f[R] option is used).
Instead, padding will be used (either on the top and bottom or on left
and right of the image) to fit the image to its neighbors.
The color of the padding is determined by the \f[B]paddingcolor\f[R]
toplevel parameter (default is white).
.IP \[bu] 2
\f[B]autocrop:\f[R] \f[B]\f[CB]no\f[B]\f[R]|\f[C]yes\f[R]
.PD 0
.P
.PD
If \f[C]yes\f[R], the image will be autocropped using the color of the
top-left pixel.
.IP \[bu] 2
\f[B]crop:\f[R] \f[B]\f[BI]width\f[B] | [ \f[BI]xwidth, ywidth\f[B] ] |
[ \f[BI]leftwidth\f[B], \f[BI]topwidth\f[B], \f[BI]rightwidth\f[B],
\f[BI]bottomwidth\f[B] ]\f[R]
.PD 0
.P
.PD
Crop the image on all four sides.
A single number specifies the width of a uniform crop.
Two numbers refer to the left/right and top/bottom crop widths.
If four numbers are given, the crop widths of all four sides can be
specified separately.
Optional.
.IP \[bu] 2
\f[B]border:\f[R]
.PD 0
.P
.PD
Optionally add a border to the image.
.RS 2
.IP \[bu] 2
\f[B]size:\f[R] \f[B]\f[BI]width\f[B] | [ \f[BI]xwidth\f[B],
\f[BI]ywidth\f[B] ] | [ \f[BI]leftwidth\f[B], \f[BI]topwidth\f[B],
\f[BI]rightwidth\f[B], \f[BI]bottomwidth\f[B] ]\f[R]
.PD 0
.P
.PD
Border size.
A single number, or a list of 2 or 4 numbers.
A single number specifies the width of a uniform border.
Two numbers refer to the left/right and top/bottom widths of the border.
If four numbers are given, the widths of the border on all four sides
can be specified separately.
If not specified then the \f[B]size\f[R] defined under the top-level
\f[B]border\f[R] property will be used; or zero if there is no top-level
\f[B]border\f[R] property.
.IP \[bu] 2
\f[B]color:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Color of the border.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
Default: white.
.RE
.RE
.IP \[bu] 2
\f[B]\f[BI]imageid\f[B]:\f[R] ...
.PD 0
.P
.PD
Any number of further images can be specified.
.RE
.IP \[bu] 2
\f[B]layout:\f[R]
.PD 0
.P
.PD
The layout of the output image is specified here.
It can be omitted if there is only one input image.
.RS 2
.IP \[bu] 2
\f[B]vjoin | hjoin:\f[R]
.PD 0
.P
.PD
Join the following images vertically (\f[B]vjoin\f[R]) or horizontally
(\f[B]hjoin\f[R]).
Must be followed by a list of the images to join.
List elements can be further \f[B]hjoin\f[R]/\f[B]vjoin\f[R] lists and
individual images.
The list can be specified either on the same line in bracket notation
(e.g.
\f[C]vjoin: [A, B, C]\f[R]) or on separate lines using the dash
notation, e.g.
.RS 2
.IP
.nf
\f[C]
vjoin:
- A
- B
- C
\f[R]
.fi
.IP \[bu] 2
\f[B]- vjoin: | hjoin: | \f[BI]imageid\f[B]\f[R]
.PD 0
.P
.PD
List element: another list of images to join vertically or horizontally,
or an image identifier for an individual image.
.IP \[bu] 2
\&...
.PD 0
.P
.PD
Images and \f[B]vjoin\f[R]/\f[B]hjoin\f[R] lists can be arbitrarily
combined and nested.
Example:
.RS 2
.IP
.nf
\f[C]
vjoin:
- hjoin: [A, B, C]
- hjoin:
- D
- vjoin: [E, F]
\f[R]
.fi
.RE
.RE
.RE
.IP \[bu] 2
\f[B]outputfile:\f[R] \f[B]\f[BI]filename\f[B]\f[R]
.PD 0
.P
.PD
Name of the output file relative to the current directory.
The extension will determine the image file type.
See Pillow
documentation (https://pillow.readthedocs.io/en/3.1.x/handbook/image-file-formats.html)
for the available file formats.
Note: If the file name starts with a \f[C]$\f[R] (it can be a single
\f[C]$\f[R] character) then it is taken from the command line
\f[C]-o\f[R] option.
.IP \[bu] 2
\f[B]finalwidth:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
The final width of the output image after joining the individual images.
The image will be resized to fit this value, retaining the aspect ratio
unless \f[B]finalheight\f[R] is also provided.
Note that this is before the \f[B]title\f[R] and the
\f[B]globalborder\f[R] are added.
Optional.
If not given, and \f[B]finalheight\f[R] is also omitted, the image will
not be resized.
.IP \[bu] 2
\f[B]finalheight:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
The final height of the output image after joining the individual
images.
The image will be resized to fit this value, retaining the aspect ratio
unless \f[B]finalwidth\f[R] is also given.
Note that this is before the \f[B]title\f[R] and the
\f[B]globalborder\f[R] are added.
Optional.
If not given, and \f[B]finalwidth\f[R] is also omitted, the image will
not be resized.
.IP \[bu] 2
\f[B]resizemethod:\f[R]
\f[B]\f[CB]nearest\f[B]\f[R]|\f[C]bilinear\f[R]|\f[C]bicubic\f[R]|\f[C]lanczos\f[R]
.PD 0
.P
.PD
Which algorithm to use to resize the individual images.
Default: \f[C]nearest\f[R].
.IP \[bu] 2
\f[B]pixelscaling:\f[R] \f[B]\f[BI]scale\f[B] | [ \f[BI]xscale\f[B],
\f[BI]yscale\f[B] ]\f[R]
.PD 0
.P
.PD
Apply this scaling factor to all pixel sizes.
Default: 1.
This parameter allows one to easily resize the output image without
having to separately adjust the font sizes, border sizes, offsets, line
coordinates, etc.
For example, \f[C]pixelscale: 0.5\f[R] will result in a half-size image,
\f[C]pixelscale: 2.0\f[R] in a double-size image.
.IP \[bu] 2
\f[B]autocrop:\f[R] \f[B]\f[CB]no\f[B]\f[R]|\f[C]yes\f[R]
.PD 0
.P
.PD
If set to \f[C]yes\f[R], all individual images will be autocropped.
This can be overridden with the \f[B]autocrop\f[R] parameter for any
individual image.
.IP \[bu] 2
\f[B]paddingcolor:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Color to use for the padding if the \f[B]fixedsize\f[R] option is used
for any image.
This will also be the background color of the whole image, which will
become visible if any of the input images has transparency or an alpha
channel.
Default: white.
.IP \[bu] 2
\f[B]border:\f[R]
.PD 0
.P
.PD
Draw a border around around each individual image before joining them.
The border parameters defined here will be used as defaults, and can be
overridden for each indivual image.
.RS 2
.IP \[bu] 2
\f[B]size:\f[R] \f[B]\f[BI]width\f[B] | [ \f[BI]xwidth\f[B],
\f[BI]ywidth\f[B] ] | [ \f[BI]leftwidth\f[B], \f[BI]topwidth\f[B],
\f[BI]rightwidth\f[B], \f[BI]bottomwidth\f[B] ]\f[R]
.PD 0
.P
.PD
Border size.
A single number, or a list of 2 or 4 numbers.
A single number specifies the width of a uniform border.
Two numbers refer to the left/right and top/bottom widths of the border.
If four numbers are given, the widths of the border on all four sides
can be specified separately.
Default: 10.
.IP \[bu] 2
\f[B]color:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Color of the border.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
Default: white.
.RE
.IP \[bu] 2
\f[B]labels:\f[R]
.PD 0
.P
.PD
Specify how labels should be added to the individual images.
These settings can be overridden for each individual image.
.RS 2
.IP \[bu] 2
\f[B]add:\f[R] \f[C]yes\f[R]|\f[B]\f[CB]no\f[B]\f[R]
.PD 0
.P
.PD
Whether to add labels.
Default: no.
.IP \[bu] 2
\f[B]fontname:\f[R] \f[B]\f[BI]fontname\f[B]\f[R]
.PD 0
.P
.PD
Name of a truetype font available on the system.
Example: \f[C]Arial_Bold\f[R].
Default: FreeSans.
.IP \[bu] 2
\f[B]fontsize:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
Font size in pixels.
Default: 32
.IP \[bu] 2
\f[B]fontcolor:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Font color.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
Default: black.
.IP \[bu] 2
\f[B]pos:\f[R]
(\f[B]\f[CB]top\f[B]\f[R]|\f[C]center\f[R]|\f[C]bottom\f[R])\f[C]-\f[R](\f[B]\f[CB]left\f[B]\f[R]|\f[C]center\f[R]|\f[C]right\f[R])
.PD 0
.P
.PD
Position of the label relative to the image.
A combination of the words (\f[C]top\f[R], \f[C]center\f[R],
\f[C]bottom\f[R]) and (\f[C]left\f[R], \f[C]center\f[R],
\f[C]right\f[R]), separated with a dash (no space in between!).
Default: \f[C]top-left\f[R].
.IP \[bu] 2
\f[B]offset:\f[R] \f[B][ \f[BI]xoffset\f[B], \f[BI]yoffset\f[B] ]\f[R]
.PD 0
.P
.PD
Offset, in pixels, for the label, relative to the position defined in
\f[B]pos\f[R].
Default: \f[C][0, 0]\f[R]
.RE
.IP \[bu] 2
\f[B]globallabels:\f[R]
.PD 0
.P
.PD
Add arbitrary labels to the final image.
Note: they will be added before adding the \f[B]globalborder\f[R].
.RS 2
.IP \[bu] 2
\f[B]fontname:\f[R] \f[B]\f[BI]fontname\f[B]\f[R]
.PD 0
.P
.PD
Name of a truetype font available on the system.
Example: \f[C]Arial_Bold\f[R].
Optional, can be overridden for each label.
.IP \[bu] 2
\f[B]fontsize:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
Font size in pixels.
Optional, can be overridden for each label.
.IP \[bu] 2
\f[B]fontcolor:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Font color.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
Optional, can be overridden for each label.
.IP \[bu] 2
\f[B]labellist:\f[R]
.PD 0
.P
.PD
List the labels.
.RS 2
.IP \[bu] 2
\f[B]-\f[R]
.PD 0
.P
.PD
Specify a label
.RS 2
.IP \[bu] 2
\f[B]text:\f[R] \f[B]\f[BI]labeltext\f[B]\f[R]
.PD 0
.P
.PD
Text of the label.
To specify a multi-line label, put it in double quotes and use
\f[C]\[rs]n\f[R] to indicate line breaks, e.g.
\f[C]\[dq]First line\[rs]nsecond line\[dq]\f[R].
Use the \f[B]align\f[R] property to specify the justification of lines.
.IP \[bu] 2
\f[B]coords:\f[R] \f[B][ \f[BI]x\f[B], \f[BI]y\f[B] ]\f[R]
.PD 0
.P
.PD
Coordinates to place the label at.
.IP \[bu] 2
\f[B]fontname:\f[R] \f[B]\f[BI]fontname\f[B]\f[R]
.PD 0
.P
.PD
Name of a truetype font available on the system.
Example: \f[C]Arial_Bold\f[R].
Optional.
.IP \[bu] 2
\f[B]fontsize:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
Font size in pixels.
Optional.
.IP \[bu] 2
\f[B]fontcolor:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Font color.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
Optional.
.IP \[bu] 2
\f[B]align:\f[R] \f[C]left\f[R] | \f[C]center\f[R] | \f[C]right\f[R]
.PD 0
.P
.PD
Justification of lines in multi-line labels.
.RE
.IP \[bu] 2
\f[B]-\f[R]
.PD 0
.P
.PD
Another label.
.RS 2
.IP \[bu] 2
\&...
.PD 0
.P
.PD
Arbitrary number of further labels can be specified.
.RE
.RE
.RE
.IP \[bu] 2
\f[B]title:\f[R]
.PD 0
.P
.PD
To add a title to the final image.
It will always be placed top-center in a separate title bar.
.RS 2
.IP \[bu] 2
\f[B]add:\f[R] \f[B]\f[CB]no\f[B]\f[R]|\f[C]yes\f[R]
.PD 0
.P
.PD
Whether to add a title.
Default: no.
.IP \[bu] 2
\f[B]text:\f[R] \f[B]\f[BI]title\f[B]\f[R]
.PD 0
.P
.PD
Title text, any string.
.IP \[bu] 2
\f[B]fontname:\f[R] \f[B]\f[BI]fontname\f[B]\f[R]
.PD 0
.P
.PD
Name of a truetype font available on the system.
Example: \f[C]Arial_Bold\f[R].
Default: FreeSans.
.IP \[bu] 2
\f[B]fontsize:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
Font size in pixels.
Default: 36
.IP \[bu] 2
\f[B]fontcolor:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Font color.
Default: black.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
.IP \[bu] 2
\f[B]bgcolor:\f[R] \f[B]\f[BI]color\f[B]\f[R]
.PD 0
.P
.PD
Background color for the title bar.
Default: white.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
.IP \[bu] 2
\f[B]height:\f[R] \f[B]\f[BI]size\f[B]\f[R]
.PD 0
.P
.PD
Height of the title bar in pixels.
The title will be placed in the middle of the title bar.
Default: 1.1*fontsize
.RE
.IP \[bu] 2
\f[B]lines:\f[R]
.PD 0
.P
.PD
Add arbitrary lines or arrows to the final image.
Note: they will be added before the \f[B]globalborder\f[R].
.RS 2
.IP \[bu] 2
\f[B]width:\f[R] \f[B]\f[BI]width\f[B]\f[R]
.PD 0
.P
.PD
Line width.
Optional, can be ovverridden for each line.
Default: 3.
.IP \[bu] 2
\f[B]color:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Line color.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
.IP \[bu] 2
\f[B]linelist:\f[R]
.PD 0
.P
.PD
List the lines.
.RS 2
.IP \[bu] 2
\f[B]-\f[R]
.RS 2
.IP \[bu] 2
\f[B]fromto:\f[R] \f[B][ \f[BI]x1\f[B], \f[BI]y1\f[B], \f[BI]x2\f[B],
\f[BI]y2\f[B] ]\f[R]
.PD 0
.P
.PD
Coordinates of start and end of line.
Mandatory.
Further line segments can be specified by continuing the list with
\f[B]\f[BI]x3, y3, x4, y4, ...\f[B]\f[R]
.IP \[bu] 2
\f[B]arrowsize:\f[R] \f[B]\f[BI]length\f[B]\f[R]
.PD 0
.P
.PD
Length of the small lines forming the arrowhead.
Default: 0.
If not provided or zero, no arrow will be drawn.
Optional.
.IP \[bu] 2
\f[B]width:\f[R] \f[B]\f[BI]width\f[B]\f[R]
.PD 0
.P
.PD
Line width.
Optional.
.IP \[bu] 2
\f[B]color:\f[R] \f[B]\f[BI]colorspec\f[B]\f[R]
.PD 0
.P
.PD
Line color.
A color name like \f[C]red\f[R], an RGB color specified as
\f[C]#rrggbb\f[R] or \f[C]rgb(red, green, blue)\f[R] with values between
0 and 255 or percentages, or a HSL color as
\f[C]hsl(hue, saturation%, lightness%)\f[R].
.RE
.IP \[bu] 2
\f[B]-\f[R]
.PD 0
.P
.PD
Any number of further lines can be defined
.RS 2
.IP \[bu] 2
\&...
.PD 0
.P
.PD