MOON
Server: Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 PHP/5.4.10
System: Linux vps.presagepowered.net 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: mckernan (512)
PHP: 5.4.10
Disabled: NONE
Upload Files
File: //usr/share/doc/netpbm-10.35.58/userguide/pnmmontage.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pnmmontage User Manual</TITLE></HEAD>
<BODY>
<H1>pnmmontage</H1>
Updated: 03 November 2007
<BR>
<A HREF="#index">Table Of Contents</A>

<H2>NAME</H2>

pnmmontage - create a montage of PNM images

<H2 id="synopsis">SYNOPSIS</H2>

<B>pnmmontage</B>

[<B>-header=</B><I>headerfile</I>]

[<B>-quality=</B><I>n</I>]

[<B>-prefix=</B><I>prefix</I>]

[<B>-0</B>|<B>-1</B>|<B>-2</B>|<B>...</B>|<B>-9</B>]

[<b>-data=</b><i>filename</i>]

<i>pnmfile</I>...

<H2 id="description">DESCRIPTION</H2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>pnmmontage</b> packs images of differing sizes into a
minimum-area composite image, optionally producing a C header file
with the locations of the subimages within the composite image.

<H2 id="options">OPTIONS</H2>

<DL COMPACT>

<DT><b>-data=</b><i>filename</i>

<dd>This option causes <b>pnmmontage</b> to write a file that describes
in machine-readable form the positions of the original images within
the packed image.  Here is an example:

<pre>
<tt>
            :0:0:227:298
            ../image1.ppm:0:0:227:149
            ../image2.ppm:0:149:227:149
</tt>
</pre>


<p>This option was new in Netpbm 10.6 (July 2002).

<DT><B>-header=</B><i>filename</i>

<DD>Tells <B>pnmmontage</B> to write a C header file of the locations
of the original images within the packed image.  Each original image
generates four #defines within the packed file: xxxX, xxxY, xxxSZX,
and xxxSZY, where xxx is the name of the file, converted to all
uppercase.  The output also includes #defines OVERALLX and OVERALLY, which
specifies the total size of the montage image.

<p>Here is an example:

<pre>
<tt>
            #define OVERALLX 227
            #define OVERALLY 298
            
            #define X 0
            #define Y 0
            #define SZX 227
            #define SZY 149
            
            #define X 0
            #define Y 149
            #define SZX 227
            #define SZY 149
</tt>
</pre>

<DT><B>-prefix</B>

<DD>Tells <B>pnmmontage</B> to use the specified prefix on all of the
#defines it generates.

<DT><B>-quality</B>

<DD>Before attempting to place the subimages, <B>pnmmontage</B> will
calculate a minimum possible area for the montage; this is either the
total of the areas of all the subimages, or the width of the widest
subimage times the height of the tallest subimage, whichever is
greater.  <B>pnmmontage</B> then initiates a problem-space search to
find the best packing; if it finds a solution that is (at least) as
good as the minimum area times the quality as a percent, it will break
out of the search.  Thus, <B>-quality=100</B> will find the best possible
solution; however, it may take a very long time to do so.  The default
is <B>-quality=200.</B>

<DT><B>-0</b>, <b>-1</b>, ... <b>-9</B>

<DD>These options control the quality at a higher level than
<B>-q</B>; <B>-0</B> is the worst quality (literally pick the first
solution found), while <B>-9</B> is the best quality (perform an
exhaustive search of problem space for the absolute best packing).
The higher the number, the slower the computation.  The default is
<B>-5</B>.

</DL>


<H2 id="notes">NOTES</H2>

<p>Using <B>-9</B> is excessively slow on all but the smallest image
sets.  If the input images differ in maxvals, then pnmmontage will pick the
smallest maxval which is evenly divisible by each of the maxvals of
the original images.

<p>The minimum area arrangement is often not a convenient shape.  For
example, it might be a tall, thin column of images, when you'd rather
have something more square.  To force a minimum width or height, you
can include a strut image - a black image that wide and one pixel high.
Similarly, you can use a vertical strut to force a minimum height.


<H2 id="seealso">SEE ALSO</H2>

<B><A HREF="pnmcat.html">pnmcat</A></B>,

<B><A HREF="pnmindex.html">pnmindex</A></B>,

<B><A HREF="pnm.html">pnm</A></B>,

<B><A HREF="pam.html">pam</A></B>,

<B><A HREF="pbm.html">pbm</A></B>,

<B><A HREF="pgm.html">pgm</A></B>,

<B><A HREF="ppm.html">ppm</A></B>

<H2 id="history">HISTORY</H2>

<p><b>pnmmontage</b> was new in Netpbm 9.10 (January 2001).


<H2 id="author">AUTHOR</H2>

Copyright (C) 2000 by Ben Olmstead.

<HR>
<H2 id="index">Table Of Contents</H2>
<UL>
<LI><A HREF="#synopsis">SYNOPSIS</A>
<LI><A HREF="#description">DESCRIPTION</A>
<LI><A HREF="#options">OPTIONS</A>
<LI><A HREF="#notes">NOTES</A>
<LI><A HREF="#seealso">SEE ALSO</A>
<LI><A HREF="#history">HISTORY</A>
<LI><A HREF="#author">AUTHOR</A>
</UL>
</BODY>
</HTML>