pamdice
slice a Netpbm image into many horizontally and/or vertically
see also :
pamcut - pnmcat - pgmslice
Synopsis
pamslice
-outstem=filenamestem
[-width=width] [-height=height]
[-verbose] [filename]
You can use the
minimum unique abbreviation of the options. You can use two
hyphens instead of one. You can separate an option name from
its value with white space instead of an equals sign.
add an example, a script, a trick and tips
examples
source
exit 127
fi
pamdice -outstem=$1 -width=256
-height=256 $2
source
exit 127
fi
pamdice -outstem=$1 -width=256
-height=256 $2
for imgFile in *.ppm
do
pnmflip -tb $imgFile | pnmtopng > `basename
$imgFile .ppm`.png
description
Reads a PAM,
PBM, PGM, or PPM image as input. Splits it horizontally
and/or vertically into equal size pieces and writes them
into separate files as the same kind of image.
See the
-outstem option for information on naming of the
output files.
The
-width and -height options determine the size
of the output pieces.
pnmcat
can rejoin the images.
options
-outstem=filenamestem
This option determines the
names of the output files. Each output file is named
filenamestem_y_x.type
where filenamestem is the value of the
-outstem option, x and y are the horizontal
and vertical locations, respectively, in the input image of
the output image, zero being the leftmost and top, and
type is .pbm, .pgm, .ppm, or
.pam, depending on the type of image.
-width=width
gives the width in pixels of
the output images. The rightmost pieces are smaller than
this if the input image is not a multiple of width
pixels wide.
-height=height
gives the height in pixels of
the output images. The bottom pieces are smaller than this
if the input image is not a multiple of height pixels
high.
-verbose
Print information about the
processing to Standard Error.
see also
pamcut ,
pnmcat , pgmslice , pnm
author
put by Bryan
Henderson in the public domain in 2001