.TL Pnmpad User Manual .SH 1 pnmpad .LP Updated: 26 January 2002 .br Table Of Contents .SH 2 NAME .LP pnmpad - add borders to a PNM image .SH 2 SYNOPSIS .LP \fBpnmpad \fR [\fB-verbose\fR] [\fB-white\fR|\fB-black\fR] .br [\fB-width=\fR\fIpixels\fR] [\fB-halign=\fR\fIratio\fR] .br [\fB-left=\fR\fIpixels\fR] [\fB-right=\fR\fIpixels\fR] .br [\fB-height=\fR\fIpixels\fR] [\fB-valign=\fR\fIratio\fR] .br [\fB-top=\fR\fIpixels\fR] [\fB-bottom=\fR\fIpixels\fR] .br [\fIpnmfile\fR] .LP All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one to designate an option. You may use either white space or an equals sign between an option name and its value. .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpnmpad\fR reads a PNM image as input and outputs a PNM image that is the input image plus black or white borders of the sizes specified. .LP If you just need to convert an image to a certain size regardless of the original dimensions, \fBpamcut\fR with the \fB-pad\fR option may be a better choice. .SH 2 OPTIONS .LP .RS .IP "\fB-verbose\fR" Verbose output. .IP "\fB-white\fR" .IP "\fB-black\fR" Set pad color. Default is \fB-black\fR. .IP "\fB-left=\fR\fIpixels\fR" .IP "\fB-right=\fR\fIpixels\fR" .IP "\fB-width=\fR\fIwidth\fR" .IP "\fB-halign=\fR\fIratio\fR" Specify amount of left and right padding in pixels. .LP \fB-left\fR and \fB-right\fR directly specify the amount of padding added to the left and right sides, respectively, of the image. .LP Alternatively, you can specify \fB-width\fR and just one of \fB-left\fR and \fB-right\fR and \fBpnmpad\fR calculates the required padding on the other side based on the width of the input image. If the \fB-width\fR value is less than the width of the image plus the specified padding, the \fB-width\fR values is ignored. .LP If you specify all three of \fB-width\fR, \fB-left\fR, and \fB-right\fR, you must ensure that the \fB-left\fR and \fB-right\fR padding are sufficient to make the image at least as wide as \fB-width\fR specifies. Otherwise, \fBpnmpad\fR fails. .LP When you specify \fB-width\fR without \fB-left\fR or \fB-right\fR, and \fB-width\fR is larger than the input image, \fBpnmpad\fR chooses left and right padding amounts in a certain ratio. That ratio defaults to half, but you can set it to anything (from 0 to 1) with the \fB-halign\fR option. If the input image is already at least as wide as \fB-width\fR specifies, \fBpnmpad\fR adds no padding. .LP Common values for \fB-halign\fR are: .RS .IP "\fB0.0\fR left aligned" .IP "\fB0.5\fR center aligned (default)" .IP "\fB1.0\fR right aligned" .RE .LP Before Netpbm 10.23 (July 2004), \fBpnmpad\fR did not allow the \fB-left\fR or \fB-right\fR option together with \fB-width\fR. .IP "\fB-top=\fR\fIpixels\fR" .IP "\fB-bottom=\fR\fIpixels\fR" .IP "\fB-height=\fR\fIheight\fR" .IP "\fB-valign=\fR\fIratio\fR" These options determine the vertical padding. They are analogous to the horizontal padding options above. .RE .SH 2 HISTORY .LP .LP Before February 2002, \fBpnmpad\fR had a different option syntax which was less expressive and not like conventional Netpbm programs. That syntax is still understood by \fBpnmpad\fR for backward compatibility, but not documented or supported for future use. .SH 2 SEE ALSO .LP \fBpbmmake\fR, \fBpnmpaste\fR, \fBpamcut\fR, \fBpnmcrop\fR, \fBpamcomp\fR, \fBpbm\fR .SH 2 AUTHOR .LP .LP Copyright (C) 2002 by Martin van Beilen .LP Copyright (C) 1990 by Angus Duggan .LP Copyright (C) 1989 by Jef Poskanzer. .LP Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty. .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu NAME .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu OPTIONS .IP \(bu HISTORY .IP \(bu SEE ALSO .IP \(bu AUTHOR .LP