crop man page on Plan9

Man page or keyword search:  
man Server   549 pages
apropos Keyword Search (all sections)
Output format
Plan9 logo
[printable version]

CROP(1)								       CROP(1)

NAME
       crop, iconv - frame, crop, and convert image

SYNOPSIS
       crop  [ -b red green blue ] [ -c red green blue ] [ -i n | -r minx miny
       maxx maxy | -x dx | -y dy ] [ -t tx ty ] [ -b red green blue ] [ file ]

       iconv [ -u ] [ -c chandesc ] [ file ]

DESCRIPTION
       Crop reads an image(6) file (default standard  input),  crops  it,  and
       writes  it as a compressed image(6) file to standard output.  There are
       two ways to specify a crop, by color value or by geometry.  They may be
       combined	 in  a	single run of crop, in which case the color value crop
       will be done first.

       The -c option takes a red-green-blue triplet as described in  color(2).
       (For  example,  white is 255 255 255.)  The corresponding color is used
       as a value to be cut from the outer edge of the picture; that  is,  the
       image  is  cropped  to  remove the maximal outside rectangular strip in
       which every pixel has the specified color.

       The -i option insets the image rectangle by a constant amount, n, which
       may  be	negative to generate extra space around the image.  The -x and
       -y options are similar, but apply only to the x or y coordinates of the
       image.

       The -r option specifies an exact rectangle.

       The  -t	option	specifies that the image's coordinate system should be
       translated by tx, ty as the last step of processing.

       The -b option specifies a background color to be used  to  fill	around
       the  image if the cropped image is larger than the original, such as if
       the -i option is given a negative argument.  This can be used to draw a
       monochrome frame around the image.  The default color is black.

       Iconv  changes the format of pixels in the image file (default standard
       input) and writes the resulting image to standard  output.   Pixels  in
       the  image  are converted according to the channel descriptor chandesc,
       (see image(6)).	For example, to convert a  4-bit-per-pixel  grey-scale
       image  to an 8-bit-per-pixel color-mapped image, chandesc should be m8.
       If chandesc is not given, the format is unchanged.  The output image is
       by default compressed; the -u option turns off the compression.

EXAMPLE
       To crop white edges off the picture and add a ten-pixel pink border,

	      crop -c 255 255 255 -i -10 -b 255 150 150 imagefile > cropped

SOURCE
       /sys/src/cmd/crop.c

SEE ALSO
       image(6), color(2)

BUGS
       Iconv should be able to do Floyd-Steinberg error diffusion or dithering
       when converting to small image depths.

								       CROP(1)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Plan9

List of man pages available for Plan9

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net