1Pnmmontage User Manual(0)                            Pnmmontage User Manual(0)
2
3
4

NAME

6       pnmmontage - create a montage of PNM images
7
8

SYNOPSIS

10       pnmmontage
11
12       [-header=headerfile]
13
14       [-quality=n]
15
16       [-prefix=prefix]
17
18       [-0|-1|-2|...|-9]
19
20       [-data=filename]
21
22       pnmfile...
23
24

DESCRIPTION

26       This program is part of Netpbm(1).
27
28       pnmmontage  packs images of differing sizes into a minimum-area compos‐
29       ite image, optionally producing a C header file with the  locations  of
30       the subimages within the composite image.
31
32

OPTIONS

34       -data=filename
35              This  option causes pnmmontage to write a file that describes in
36              machine-readable form  the  positions  of  the  original  images
37              within the packed image.  Here is an example:
38
39                          :0:0:227:298
40                          ../image1.ppm:0:0:227:149
41                          ../image2.ppm:0:149:227:149
42
43              This option was new in Netpbm 10.6 (July 2002).
44
45
46       -header=filename
47              Tells  pnmmontage  to  write a C header file of the locations of
48              the original images within  the  packed  image.   Each  original
49              image  generates  four  #defines  within  the packed file: xxxX,
50              xxxY, xxxSZX, and xxxSZY, where xxx is the  name  of  the  file,
51              converted  to  all uppercase.  The output also includes #defines
52              OVERALLX and OVERALLY, which specifies the  total  size  of  the
53              montage image.
54
55              Here is an example:
56
57                          #define OVERALLX 227
58                          #define OVERALLY 298
59
60                          #define X 0
61                          #define Y 0
62                          #define SZX 227
63                          #define SZY 149
64
65                          #define X 0
66                          #define Y 149
67                          #define SZX 227
68                          #define SZY 149
69
70
71       -prefix
72              Tells  pnmmontage  to  use  the  specified  prefix on all of the
73              #defines it generates.
74
75
76       -quality
77              Before attempting to place the subimages, pnmmontage will calcu‐
78              late a minimum possible area for the montage; this is either the
79              total of the areas of all the subimages, or  the  width  of  the
80              widest subimage times the height of the tallest subimage, which‐
81              ever is greater.   pnmmontage  then  initiates  a  problem-space
82              search  to find the best packing; if it finds a solution that is
83              (at least) as good as the minimum area times the  quality  as  a
84              percent,  it  will  break out of the search.  Thus, -quality=100
85              will find the best possible solution; however,  it  may  take  a
86              very long time to do so.  The default is -quality=200.
87
88
89       -0, -1, ... -9
90              These  options control the quality at a higher level than -q; -0
91              is the worst quality (literally pick the first solution  found),
92              while  -9  is  the best quality (perform an exhaustive search of
93              problem space for the absolute best packing).   The  higher  the
94              number, the slower the computation.  The default is -5.
95
96
97
98
99

NOTES

101       Using  -9  is  excessively slow on all but the smallest image sets.  If
102       the input images differ in  maxvals,  then  pnmmontage  will  pick  the
103       smallest maxval which is evenly divisible by each of the maxvals of the
104       original images.
105
106       The minimum area arrangement is often  not  a  convenient  shape.   For
107       example,  it  might be a tall, thin column of images, when you'd rather
108       have something more square.  To force a minimum width  or  height,  you
109       can include a strut image - a black image that wide and one pixel high.
110       Similarly, you can use a vertical strut to force a minimum height.
111
112
113

SEE ALSO

115       pnmcat(1), pnmindex(1), pnm(1), pam(1), pbm(1), pgm(1), ppm(1)
116
117

HISTORY

119       pnmmontage was new in Netpbm 9.10 (January 2001).
120
121
122

AUTHOR

124       Copyright (C) 2000 by Ben Olmstead.
125
126
127
128netpbm documentation           03 November 2007      Pnmmontage User Manual(0)
Impressum