Linux Commands Examples

A great documentation place for Linux commands

pnmmargin

add a border to a portable anymap

Synopsis

pnmmargin [-white|-black|-color colorspec] size [pnmfile]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
destination=../public/"`basename $source`"
echo $destination
pngtopnm $source | pnmscale $scale | pnmcrop | pnmmargin -color "$background" 2 | pnmtopng -transparent "$background" > $destination
0
source
            
w ) width=$OPTARG
border=' | pnmmargin $colour $width' ;;
c ) colour="-color $OPTARG"
c ) colour="-color $OPTARG"
border=' | pnmmargin $colour $width' ;;
\? ) echo $usage
exit 1 ;;

description

Reads a portable anymap as input. Adds a border of the specified number of pixels, and produces a portable anymap as output.

options

You can specify the border color with the -white, -black, and -color flags. If no color is specified, the program makes a guess.


bugs

It’s a script. Scripts are not portable to non-Unix environments.


see also

pnm


author

Copyright (C) 1991 by Jef Poskanzer.

How can this site be more helpful to YOU ?


give  feedback