.TL Pbmclean User Manual .SH 1 pbmclean .LP Updated: 27 Feb 2005 .br Table Of Contents .SH 2 NAME .LP pbmclean - flip isolated pixels in portable bitmap .SH 2 SYNOPSIS .LP \fBpbmclean\fR [\fB-minneighbors=\fR\fIN\fR] [\fB-black\fR|\fB-white\fR] [\fIpbmfile\fR] .LP 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. .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpbmclean\fR cleans up a PBM image of random specs. It reads a PBM image as input and outputs a PBM that is the same as the input except with isolated pixels inverted. An isolated pixel is one that has very few neighboring pixels of the same color. The \fB-minneighbors\fR option gives the number of same-color neighbors are required. .LP The default is 1 pixel -- only completely isolated pixels are flipped. .LP (A \fB-minneighbors\fR value greater than 8 generates a completely inverted image (but use \fBpnminvert\fR to do that) -- or a completely white or completely black image with the \fB-black\fR or \fB-white\fR option). .LP \fBpbmclean\fR considers the area beyond the edges of the image to be white. (This matters when you consider pixels right on the edge of the image). .LP You can use \fBpbmclean \fR to clean up "snow" on bitmap images. .SH 2 OPTIONS .LP .RS .IP "\fB-black\fR" .IP "\fB-white\fR" Flip pixels of the specified color. By default, if you specify neither \fB-black\fR nor \fB-white\fR, \fBpbmclean\fR flips both black and white pixels which do not have sufficient identical neighbors. If you specify \fB-black\fR, \fBpbmclean\fR leaves the white pixels alone and just erases isolated black pixels. Vice versa for \fB-white\fR. You may specify both \fB-black\fR and \fB-white\fR to get the same as the default behavior. .IP "\fB-minneighbors=\fR\fIN\fR" This determines how many pixels must be in a cluster in order for \fBpbmclean\fR to consider them legitimate and not clean them out of the image. See Description. .LP Before December 2001, \fBpbmclean\fR accepted \fB-\fR\fIN\fR instead of \fB-minneighbors\fR. Before Netpbm 10.27 (March 2005), \fB-minneighbors\fR was \fB-minneighbor\fR. .RE .SH 2 SEE ALSO .LP \fBpbm\fR .SH 2 AUTHOR .LP Copyright (C) 1990 by Angus Duggan Copyright (C) 1989 by Jef Poskanzer. Copyright (C) 2001 by Michael Sternberg. .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 SEE ALSO .IP \(bu AUTHOR .LP