From a87703a515ec08a0637c2b3b3e6cd0ef1a7e78ff Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 11 Jul 2020 03:14:39 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@3893 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- pnmcrop.html | 165 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 84 insertions(+), 81 deletions(-) (limited to 'pnmcrop.html') diff --git a/pnmcrop.html b/pnmcrop.html index 951d8e2b..3c9c572c 100644 --- a/pnmcrop.html +++ b/pnmcrop.html @@ -1,40 +1,39 @@ - -Pnmcrop User Manual - -

pnmcrop

+ +Pnmcrop User Manual + +

pnmcrop

Updated: 04 October 2019 -
-Table Of Contents - -

NAME

+
+Table Of Contents +

NAME

pnmcrop - crop a Netpbm image -

SYNOPSIS

+

SYNOPSIS

-pnmcrop +pnmcrop -[-white -|-black -|-sides +[-white +|-black +|-sides |-bg-color=color |-bg-corner={ topleft|topright|bottomleft|bottomright} ] -[-left] +[-left] -[-right] +[-right] -[-top] +[-top] -[-bottom] +[-bottom] -[-margin=pixels] +[-margin=pixels] -[-closeness=closeness_percent] +[-closeness=closeness_percent] -[-borderfile=filename] +[-borderfile=filename] [-blank-image={abort|pass|minimize|maxcrop}] @@ -42,14 +41,14 @@ pnmcrop - crop a Netpbm image [-verbose] -[pnmfile] +[pnmfile] -

Minimum unique abbreviation of option is acceptable. You may use +

Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphen to denote options. You may use white space in place of the equals sign to separate an option name from its value. -

DESCRIPTION

+

DESCRIPTION

This program is part of Netpbm. @@ -57,18 +56,18 @@ from its value. borders that are the background color, and produces the same type of image as output. -

If you don't specify otherwise, pnmcrop assumes the +

If you don't specify otherwise, pnmcrop assumes the background color is whatever color the top left and right corners of the image are and if they are different colors, something midway between them. You can specify that the background is white or black -with the -white and -black options or make -pnmcrop base its guess on all four corners instead of just two -with -sides. +with the -white and -black options or make +pnmcrop base its guess on all four corners instead of just two +with -sides. -

By default, pnmcrop chops off any stripe of background color -it finds, on all four sides. You can tell pnmcrop to remove -only specific borders with the -left, -right, - -top, and -bottom options. +

By default, pnmcrop chops off any stripe of background color +it finds, on all four sides. You can tell pnmcrop to remove +only specific borders with the -left, -right, + -top, and -bottom options.

But note that pnmcrop's determination of the background color is independent of which edges you crop, which may not be intuitive. For example, @@ -78,7 +77,7 @@ to crop the black border, but you actually won't crop anything, because pnmcrop considers the background color to be whatever color the top two corners are, which is blue, and there is no blue at the bottom of the image. If you do want pnmcrop to take the background color from the -edges being cropped, use -bg-corner. +edges being cropped, use -bg-corner.

If you want to leave some border, use the -margin option. It will not only spare some of the border from cropping, but will fill in @@ -92,27 +91,32 @@ of images of the same dimensions, you may end up with images of differing dimensions. Before Netpbm 10.37 (December 2006), pnmcrop ignored all input images but the first. -

If you want to chop a specific amount off the side of an image, use -pamcut. +

If you want to chop a specific amount off the side of an image, use +pamcut. + +

If you want to add different borders after removing the existing +ones, use pnmcat or pamcomp. -

If you want to add different borders after removing the existing -ones, use pnmcat or pamcomp. +

OPTIONS

-

OPTIONS

+

In addition to the options common to all programs based on libnetpbm +(most notably -quiet, see +Common Options), pnmcrop recognizes the following +command line options: -

-
-white +
+
-white -
Take white to be the background color. pnmcrop removes +
Take white to be the background color. pnmcrop removes borders which are white.

You may specify at most one of -black, -white, -sides, -bg-color, and -bg-corner. -

-black +
-black -
Take black to be the background color. pnmcrop removes +
Take black to be the background color. pnmcrop removes borders which are black.

You may specify at most one of -black, -white, -sides, @@ -130,23 +134,23 @@ areas of this color. color is a value that would be used as the

This option was new in Netpbm 10.86 (March 2019). -

-sides +
-sides -
Determine the background color from the colors of the four corners -of the input image. pnmcrop removes borders which are of the +
Determine the background color from the colors of the four corners +of the input image. pnmcrop removes borders which are of the background color. -

If at least three of the four corners are the same color, -pnmcrop takes that as the background color. If not, -pnmcrop looks for two corners of the same color in the +

If at least three of the four corners are the same color, +pnmcrop takes that as the background color. If not, +pnmcrop looks for two corners of the same color in the following order, taking the first found as the background color: top, left, right, bottom. If all four corners are different colors, -pnmcrop assumes an average of the four colors as the background +pnmcrop assumes an average of the four colors as the background color. -

The -sides option slows pnmcrop down, as it reads the +

The -sides option slows pnmcrop down, as it reads the entire image to determine the background color in addition to the up -to three times that it would read it without -sides. +to three times that it would read it without -sides.

You may specify at most one of -black, -white, -sides, -bg-color, and -bg-corner. @@ -162,21 +166,21 @@ color.

This option was new in Netpbm 10.86 (March 2019). -

-left +
-left -
Remove any left border. +
Remove any left border. -
-right +
-right -
Remove any right border. +
Remove any right border. -
-top +
-top -
Remove any top border. +
Remove any top border. -
-bottom +
-bottom -
Remove any bottom border. +
Remove any bottom border.
-margin=pixels @@ -185,9 +189,9 @@ if necessary.

This option was new in Netpbm 10.29 (August 2005). -

-closeness=closeness_percent +
-closeness=closeness_percent -

Any color in the image that is at least this close to the operative +

Any color in the image that is at least this close to the operative background color is considered to be background.

You can use this if the image has borders that vary slightly in color, such @@ -341,35 +345,34 @@ bottom, width, and height.

This option was new in Netpbm 10.86 (March 2019). -

-verbose +
-verbose -
Print on Standard Error information about the processing, +
Print on Standard Error information about the processing, including exactly how much is being cropped off of which sides. -
+
-

SEE ALSO

+

SEE ALSO

-pamcut, +pamcut, -pamfile, +pamfile, -pnm +pnm -

AUTHOR

+

AUTHOR

Copyright (C) 1989 by Jef Poskanzer. -
-  -

Table Of Contents

- - - +
+

Table Of Contents

+ + + -- cgit 1.4.1