| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pnmmontage User Manual" 1 "22 November 2012" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
pnmmontage - create a montage of PNM images |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBpnmmontage\fP |
| 15 |
|
| 16 |
[\fB-header=\fP\fIheaderfile\fP] |
| 17 |
|
| 18 |
[\fB-quality=\fP\fIn\fP] |
| 19 |
|
| 20 |
[\fB-prefix=\fP\fIprefix\fP] |
| 21 |
|
| 22 |
[\fB-0\fP|\fB-1\fP|\fB-2\fP|\fB...\fP|\fB-9\fP] |
| 23 |
|
| 24 |
[\fB-data=\fP\fIfilename\fP] |
| 25 |
|
| 26 |
\fIpnmfile\fP... |
| 27 |
|
| 28 |
.UN description |
| 29 |
.SH DESCRIPTION |
| 30 |
.PP |
| 31 |
This program is part of |
| 32 |
.BR "Netpbm" (1)\c |
| 33 |
\&. |
| 34 |
.PP |
| 35 |
\fBpnmmontage\fP packs images of differing sizes into a minimum-area |
| 36 |
composite image. |
| 37 |
.PP |
| 38 |
Areas of the output that cannot be occupied by an image are black. |
| 39 |
|
| 40 |
|
| 41 |
.UN options |
| 42 |
.SH OPTIONS |
| 43 |
.PP |
| 44 |
In addition to the options common to all programs based on libnetpbm |
| 45 |
(most notably \fB-quiet\fP, see |
| 46 |
.UR index.html#commonoptions |
| 47 |
Common Options |
| 48 |
.UE |
| 49 |
\&), \fBpnmmontage\fP recognizes the following |
| 50 |
command line options: |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
.TP |
| 55 |
\fB-data=\fP\fIfilename\fP |
| 56 |
This option causes \fBpnmmontage\fP to write a file that describes |
| 57 |
in machine-readable form the positions of the original images within |
| 58 |
the packed image. Here is an example: |
| 59 |
|
| 60 |
.nf |
| 61 |
|
| 62 |
:0:0:227:298 |
| 63 |
../image1.ppm:0:0:227:149 |
| 64 |
../image2.ppm:0:149:227:149 |
| 65 |
|
| 66 |
|
| 67 |
.fi |
| 68 |
.sp |
| 69 |
There is a line for each component image and one for the composite. |
| 70 |
.sp |
| 71 |
The 5 fields on each line are: |
| 72 |
|
| 73 |
|
| 74 |
.IP \(bu |
| 75 |
source image name (or null string indicating the line for the composite |
| 76 |
image) |
| 77 |
.IP \(bu |
| 78 |
Column number of upper left corner of the image |
| 79 |
.IP \(bu |
| 80 |
Row number of upper left corner of the image |
| 81 |
.IP \(bu |
| 82 |
width of the image (columns) |
| 83 |
.IP \(bu |
| 84 |
height of the image (rows) |
| 85 |
|
| 86 |
.sp |
| 87 |
This option was new in Netpbm 10.6 (July 2002). |
| 88 |
|
| 89 |
.TP |
| 90 |
\fB-header=\fP\fIfilename\fP |
| 91 |
Tells \fBpnmmontage\fP to write a C header file of the locations |
| 92 |
of the original images within the packed image. Each original image |
| 93 |
generates four #defines within the packed file: xxxX, xxxY, xxxSZX, |
| 94 |
and xxxSZY, where xxx is the name of the file, converted to all |
| 95 |
uppercase. The output also includes #defines OVERALLX and OVERALLY, which |
| 96 |
specifies the total size of the montage image. |
| 97 |
.sp |
| 98 |
Here is an example: |
| 99 |
|
| 100 |
.nf |
| 101 |
\f(CW |
| 102 |
#define OVERALLX 227 |
| 103 |
#define OVERALLY 298 |
| 104 |
|
| 105 |
#define X 0 |
| 106 |
#define Y 0 |
| 107 |
#define SZX 227 |
| 108 |
#define SZY 149 |
| 109 |
|
| 110 |
#define X 0 |
| 111 |
#define Y 149 |
| 112 |
#define SZX 227 |
| 113 |
#define SZY 149 |
| 114 |
\fP |
| 115 |
|
| 116 |
.fi |
| 117 |
|
| 118 |
.TP |
| 119 |
\fB-prefix\fP |
| 120 |
Tells \fBpnmmontage\fP to use the specified prefix on all of the |
| 121 |
#defines it generates. |
| 122 |
|
| 123 |
.TP |
| 124 |
\fB-quality\fP |
| 125 |
Before attempting to place the subimages, \fBpnmmontage\fP will |
| 126 |
calculate a minimum possible area for the montage; this is either the |
| 127 |
total of the areas of all the subimages, or the width of the widest |
| 128 |
subimage times the height of the tallest subimage, whichever is |
| 129 |
greater. \fBpnmmontage\fP then initiates a problem-space search to |
| 130 |
find the best packing; if it finds a solution that is (at least) as |
| 131 |
good as the minimum area times the quality as a percent, it will break |
| 132 |
out of the search. Thus, \fB-quality=100\fP will find the best possible |
| 133 |
solution; however, it may take a very long time to do so. The default |
| 134 |
is \fB-quality=200.\fP |
| 135 |
|
| 136 |
.TP |
| 137 |
\fB-0\fP, \fB-1\fP, ... \fB-9\fP |
| 138 |
These options control the quality at a higher level than |
| 139 |
\fB-quality\fP; \fB-0\fP is the worst quality (pick the first |
| 140 |
solution found), while \fB-9\fP is the best quality (perform an |
| 141 |
exhaustive search of problem space for the absolute best packing). |
| 142 |
The higher the number, the slower the computation. The default is |
| 143 |
\fB-5\fP. |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
.UN notes |
| 149 |
.SH NOTES |
| 150 |
.PP |
| 151 |
Using \fB-9\fP is very slow on all but the smallest image sets. |
| 152 |
.PP |
| 153 |
The minimum area arrangement is often not a convenient shape. For |
| 154 |
example, it might be a tall, thin column of images, when you'd rather |
| 155 |
have something more square. To force a minimum width or height, you |
| 156 |
can include a strut image - a black image that wide and one pixel high. |
| 157 |
Similarly, you can use a vertical strut to force a minimum height. |
| 158 |
|
| 159 |
|
| 160 |
.UN seealso |
| 161 |
.SH SEE ALSO |
| 162 |
.BR "pamcat" (1)\c |
| 163 |
\&, |
| 164 |
.BR "pnmindex" (1)\c |
| 165 |
\&, |
| 166 |
.BR "pnm" (1)\c |
| 167 |
\&, |
| 168 |
.BR "pam" (1)\c |
| 169 |
\&, |
| 170 |
.BR "pbm" (1)\c |
| 171 |
\&, |
| 172 |
.BR "pgm" (1)\c |
| 173 |
\&, |
| 174 |
.BR "ppm" (1)\c |
| 175 |
\& |
| 176 |
|
| 177 |
.UN history |
| 178 |
.SH HISTORY |
| 179 |
.PP |
| 180 |
\fBpnmmontage\fP was new in Netpbm 9.10 (January 2001). |
| 181 |
|
| 182 |
|
| 183 |
.UN author |
| 184 |
.SH AUTHOR |
| 185 |
|
| 186 |
Copyright (C) 2000 by Ben Olmstead. |
| 187 |
.SH DOCUMENT SOURCE |
| 188 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 189 |
source. The master documentation is at |
| 190 |
.IP |
| 191 |
.B http://netpbm.sourceforge.net/doc/pnmmontage.html |
| 192 |
.PP |