{
    "mode": "man",
    "parameter": "netpbm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/netpbm/1/json",
    "generated": "2026-06-15T13:39:33Z",
    "sections": {
        "NAME": {
            "content": "netpbm - package of graphics manipulation programs and libraries\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Netpbm is a package of graphics programs and programming libraries.\n\nThere  are over 220 separate programs in the package, most of which have \"pbm\", \"pgm\", \"ppm\",\nor \"pnm\" in their names.  For example, pnmscale and giftopnm.\n\nFor example, you might use pnmscale to shrink an image by 10%.  Or use pnmcomp to overlay one\nimage on top of another.  Or use pbmtext to create an image of text.  Or reduce the number of\ncolors in an image with pnmquant.\n\n",
            "subsections": [
                {
                    "name": "The Netpbm Formats",
                    "content": "All of the programs work with a set of graphics formats called the \"netpbm\" formats.  Specif‐\nically,  these  formats are pbm(5), pgm(5), ppm(5), and pam(5).  The first three of these are\nsometimes known generically as pnm.  Many of the Netpbm programs convert from a Netpbm format\nto  another  format  or  vice  versa.   This is so you can use the Netpbm programs to work on\ngraphics of any format.  It is also common to use a combination of Netpbm programs to convert\nfrom  one  non-Netpbm format to another non-Netpbm format.  Netpbm has converters for over 80\ngraphics formats, and as a package Netpbm lets you do more graphics format  conversions  than\nany other computer graphics facility.\n\nThe  Netpbm  formats  are all raster formats, i.e. they describe an image as a matrix of rows\nand columns of pixels.  In the PBM format, the pixels are black and white.  In the  PGM  for‐\nmat,  pixels  are  shades of gray.  In the PPM format, the pixels are in full color.  The PAM\nformat is more sophisticated.  A replacement for all three of the other formats, it can  rep‐\nresent  matrices of general data including but not limited to black and white, grayscale, and\ncolor images.\n\nPrograms designed to work with PBM images have \"pbm\" in their names.   Programs  designed  to\nwork with PGM, PPM, and PAM images similarly have \"pgm\", \"ppm\", and \"pam\" in their names.\n\nAll  Netpbm programs designed to read PGM images see PBM images as if they were PGM too.  All\nNetpbm programs designed to read PPM images see PGM and PBM images as if they were PPM.   See\nthe section \"Implied Format Conversion\" below.\n\nPrograms  that  have  \"pnm\"  in their names read PBM, PGM, and PPM but unlike \"ppm\" programs,\nthey distinguish between them and their function depends on the format.   For  example,  pnm‐‐\ntogif  creates a black and white GIF output image if its input is PBM or PGM, but a color GIF\noutput image if its input is PPM.  And pnmscale produces an output image of the  same  format\nas  the input.  A ppmscale program would read all three PNM input formats, but would see them\nall as PPM and would always generate PPM output.\n\nIf it seems wasteful to you to have three separate PNM formats, be aware that there is a his‐\ntorical  reason  for  it.  In the beginning, there were only PBMs.  PGMs came later, and then\nPPMs.  Much later came PAM, which realizes the possibility of having just one aggregate  for‐\nmat.\n\nThe formats are described in the man pages pbm(5), pgm(5), ppm(5), and pam(5),\n\n"
                },
                {
                    "name": "Implied Format Conversion",
                    "content": "A  program  that  uses the PGM library to read an image can read a PBM image as well as a PGM\nimage.  The program sees the PBM image as if it were the equivalent PGM image, with a  maxval\nof 255.\n\nA  program  that  uses the PPM library to read an image can read a PGM image as well as a PPM\nimage and a PBM image as well as a PGM image.  The program sees the PBM or PGM image as if it\nwere  the  equivalent  PPM image, with a maxval of 255 in the PBM case and the same maxval as\nthe PGM in the PGM case.\n\n"
                },
                {
                    "name": "Netpbm and Transparency",
                    "content": "In many graphics format, there's a means of indicating that certain parts of  the  image  are\nwholly  or partially transparent, meaning that if it were displayed \"over\" another image, the\nother image would show through there.  Netpbm  formats  deliberately  omit  that  capability,\nsince their purpose is to be extremely simple.\n\nIn Netpbm, you handle transparency via a transparency mask in a separate (slightly redefined)\nPGM image.  In this pseudo-PGM, what would normally be a pixel's intensity is instead  it  an\nopaqueness  value.  See pgm(5).  pnmcomp is an example of a program that uses a PGM transpar‐\nency mask.\n\n"
                },
                {
                    "name": "The Netpbm Programs",
                    "content": "The Netpbm programs are generally useful run by a person from a command shell, but  are  also\ndesigned to be used by programs.  A common characteristic of Netpbm programs is that they are\nsimple, fundamental building blocks.  They are  most  powerful  when  stacked  in  pipelines.\nNetpbm  programs do not use graphical user interfaces (in fact, none of them display graphics\nat all, except for a very simple Linux Svgalib displayer) and do not seek input from a user.\n\nEach of these programs has its own man page.\n\n"
                },
                {
                    "name": "Common Options",
                    "content": "There are a few options that are present on all programs that are based  on  the  Netpbm  li‐\nbraries,  including virtually all Netpbm programs.  These are not mentioned in the individual\nman pages for the programs.\n\n"
                },
                {
                    "name": "-quiet",
                    "content": "(To  be precise, this only works to the extent that the program in question implements\nthe Netpbm convention of issuing all informational messages via the pmmessage()  ser‐\nvice of the Netpbm libraries).\n"
                },
                {
                    "name": "-version",
                    "content": "Instead  of  doing anything else, report the version of the libpbm library linked with\nthe program (it may have been linked  statically  into  the  program,  or  dynamically\nlinked at run time).  Normally, the Netpbm programs and the libraries are installed at\nthe same time, so this tells you the version of the program and all the  other  Netpbm\nlibraries and files it uses as well.\n\nHere  is  a directory of the Netpbm programs.  You can also use man -k to search for a\nprogram that does what you want.\n\n"
                },
                {
                    "name": "Converters",
                    "content": ""
                },
                {
                    "name": "ppmtompeg",
                    "content": "convert series of PPM frames to an MPEG movie\n"
                },
                {
                    "name": "jpegtopnm",
                    "content": "convert JFIF/JPEG/EXIF file to Netpbm format\n"
                },
                {
                    "name": "pnmtojpeg",
                    "content": "convert PPM to JPEG/JFIF/EXIF format\n"
                },
                {
                    "name": "anytopnm",
                    "content": "convert any graphics format to Netpbm format\n"
                },
                {
                    "name": "bmptoppm",
                    "content": "convert Windows or OS/2 Bitmap file to PPM\n"
                },
                {
                    "name": "ppmtobmp",
                    "content": "convert PPM to Windows or OS/2 Bitmap file\n"
                },
                {
                    "name": "winicontoppm",
                    "content": "convert Windows icon file to PPM\n"
                },
                {
                    "name": "ppmtowinicon",
                    "content": "convert PPM to Windows icon file\n"
                },
                {
                    "name": "giftopnm",
                    "content": "convert GIF to portable anymap\n"
                },
                {
                    "name": "ppmtogif",
                    "content": "convert PPM to GIF\n"
                },
                {
                    "name": "pnmtopng",
                    "content": "convert Netpbm format to Portable Network Graphics\n"
                },
                {
                    "name": "pngtopnm",
                    "content": "convert PNG (Portable Network Graphics) to Netpbm formats\n"
                },
                {
                    "name": "palmtopnm",
                    "content": "convert Palm pixmap to Netpbm formats\n"
                },
                {
                    "name": "pnmtopalm",
                    "content": "convert Netpbm formats to Palm pixmap\n"
                },
                {
                    "name": "jbigtopbm",
                    "content": "convert JBIG BIE (compressed bitmap) to PBM\n"
                },
                {
                    "name": "pamtopnm",
                    "content": "convert a PAM image to PBM, PGM, or PPM\n"
                },
                {
                    "name": "pbmtojbig",
                    "content": "convert PBM to JBIG BIE (compressed bitmap)\n"
                },
                {
                    "name": "pnmtofiasco",
                    "content": "convert Netpbm image to Fiasco (wfa) highly compressed format\n"
                },
                {
                    "name": "fiascotopnm",
                    "content": "convert Fiasco (wfa) highly compressed format to Netpbm image\n"
                },
                {
                    "name": "hpcdtoppm",
                    "content": "convert photo CD to PPM\n"
                },
                {
                    "name": "pbmtonokia",
                    "content": "convert PBM to Nokia Smart Messaging Format (SMF)\n"
                },
                {
                    "name": "pbmtowbmp",
                    "content": "convert PBM to WAP (Wireless App Protocol) Wireless Bitmap\n"
                },
                {
                    "name": "wbmptopbm",
                    "content": "convert WAP (Wireless App Protocol) Wireless Bitmap to PBM\n"
                },
                {
                    "name": "neotoppm",
                    "content": "convert Atari Neochrome (.neo) image to PPM\n"
                },
                {
                    "name": "ppmtoneo",
                    "content": "convert PPM image to Atari Neochrome (.neo)\n"
                },
                {
                    "name": "pbmtomda",
                    "content": "convert from PBM to Microdesign (for Amstrad PCWs)\n"
                },
                {
                    "name": "mdatopbm",
                    "content": "convert from Microdesign (for Amstrad PCWs) to PBM\n"
                },
                {
                    "name": "atktopbm",
                    "content": "convert Andrew Toolkit raster object to PBM\n"
                },
                {
                    "name": "pbmtoatk",
                    "content": "convert PBM to Andrew Toolkit raster object\n"
                },
                {
                    "name": "brushtopbm",
                    "content": "convert Xerox doodle brushes to PBM\n"
                },
                {
                    "name": "cmuwmtopbm",
                    "content": "convert CMU window manager format to PBM\n"
                },
                {
                    "name": "g3topbm",
                    "content": "convert Group 3 FAX to PBM\n"
                },
                {
                    "name": "pbmtog3",
                    "content": "convert PBM to Group 3 FAX\n"
                },
                {
                    "name": "icontopbm",
                    "content": "convert Sun icon to PBM\n"
                },
                {
                    "name": "pbmtoicon",
                    "content": "convert PBM to Sun icon\n"
                },
                {
                    "name": "gemtopnm",
                    "content": "convert GEM .img format to PBM or pixmap\n"
                },
                {
                    "name": "macptopbm",
                    "content": "convert MacPaint to PBM\n"
                },
                {
                    "name": "pbmtomacp",
                    "content": "convert PBM to MacPaint\n"
                },
                {
                    "name": "mgrtopbm",
                    "content": "convert MGR format to PBM\n"
                },
                {
                    "name": "pbmtomgr",
                    "content": "convert PBM to MGR format\n"
                },
                {
                    "name": "pi3topbm",
                    "content": "convert Atari Degas .pi3 to PBM\n"
                },
                {
                    "name": "pbmtopi3",
                    "content": "convert PBM to Atari Degas .pi3\n"
                },
                {
                    "name": "xbmtopbm",
                    "content": "convert X10 or X11 bitmap to PBM\n"
                },
                {
                    "name": "pbmtoxbm",
                    "content": "convert PBM to X11 bitmap\n"
                },
                {
                    "name": "pbmtox10bm",
                    "content": "convert PBM to X10 bitmap\n"
                },
                {
                    "name": "ybmtopbm",
                    "content": "convert Bennet Yee \"face\" file into PBM\n"
                },
                {
                    "name": "pbmtoybm",
                    "content": "convert PBM into Bennet Yee \"face\" file\n"
                },
                {
                    "name": "pbmto10x",
                    "content": "convert PBM to Gemini 10x printer graphics\n"
                },
                {
                    "name": "pbmtoascii",
                    "content": "convert PBM to ASCII graphic form\n"
                },
                {
                    "name": "asciitopgm",
                    "content": "convert ASCII character graphics to PGM\n"
                },
                {
                    "name": "pbmtobbnbg",
                    "content": "convert PBM to BBN BitGraph graphics\n"
                },
                {
                    "name": "pbmtocmuwm",
                    "content": "convert PBM to CMU window manager format\n"
                },
                {
                    "name": "pbmtoepson",
                    "content": "convert PBM to Epson printer graphics\n"
                },
                {
                    "name": "pbmtogem",
                    "content": "convert PBM into GEM .img file\n"
                },
                {
                    "name": "pbmtogo",
                    "content": "convert PBM to GraphOn graphics\n"
                },
                {
                    "name": "pbmtolj",
                    "content": "convert PBM to HP LaserJet black and white graphics\n"
                },
                {
                    "name": "ppmtolj",
                    "content": "convert PPM to HP LaserJet color graphics (PCL)\n"
                },
                {
                    "name": "pjtoppm",
                    "content": "convert HP PaintJet file to PPM\n"
                },
                {
                    "name": "ppmtopj",
                    "content": "convert PPM to HP PaintJet file\n"
                },
                {
                    "name": "thinkjettopbm",
                    "content": "convert HP Thinkjet printer stream to PBM\n"
                },
                {
                    "name": "pbmtoplot",
                    "content": "convert PBM into Unix plot(5) file\n"
                },
                {
                    "name": "pbmtoptx",
                    "content": "convert PBM to Printronix graphics\n"
                },
                {
                    "name": "pbmtozinc",
                    "content": "convert PBM to Zinc Interface Library icon\n"
                },
                {
                    "name": "fitstopnm",
                    "content": "convert FITS format to portable anymap\n"
                },
                {
                    "name": "pnmtofits",
                    "content": "convert Netpbm formats to FITS format\n"
                },
                {
                    "name": "fstopgm",
                    "content": "convert Usenix FaceSaver(tm) format to PGM\n"
                },
                {
                    "name": "pgmtofs",
                    "content": "convert PGM to Usenix FaceSaver(tm) format\n"
                },
                {
                    "name": "hipstopgm",
                    "content": "convert HIPS format to PGM\n"
                },
                {
                    "name": "lispmtopgm",
                    "content": "convert a Lisp Machine bitmap file into PGM format\n"
                },
                {
                    "name": "pgmtolispm",
                    "content": "convert PGM into Lisp Machine format\n"
                },
                {
                    "name": "pnmtops",
                    "content": "convert Netpbm formats to Postscript\n"
                },
                {
                    "name": "pstopnm",
                    "content": "convert Postscript to Netpbm formats\n"
                },
                {
                    "name": "psidtopgm",
                    "content": "convert PostScript \"image\" data to PGM\n"
                },
                {
                    "name": "pbmtolps",
                    "content": "convert PBM image to Postscript using lines\n"
                },
                {
                    "name": "pbmtoepsi",
                    "content": "convert a PBM image to encapsulated Postscript preview bitmap\n"
                },
                {
                    "name": "pbmtopsg3",
                    "content": "convert PBM images to Postscript using G3 fax compression.\n"
                },
                {
                    "name": "rawtopgm",
                    "content": "convert raw grayscale bytes to PGM\n"
                },
                {
                    "name": "pgmtopbm",
                    "content": "convert PGM to PBM\n"
                },
                {
                    "name": "gouldtoppm",
                    "content": "convert Gould scanner file to PPM\n"
                },
                {
                    "name": "ilbmtoppm",
                    "content": "convert IFF ILBM to PPM\n"
                },
                {
                    "name": "ppmtoilbm",
                    "content": "convert PPM to IFF ILBM\n"
                },
                {
                    "name": "imgtoppm",
                    "content": "convert Img-whatnot to PPM\n"
                },
                {
                    "name": "mtvtoppm",
                    "content": "convert MTV ray-tracer output to PPM\n"
                },
                {
                    "name": "pcxtoppm",
                    "content": "convert PC Paintbrush format to PPM\n"
                },
                {
                    "name": "pgmtoppm",
                    "content": "colorize a portable graymap into a PPM\n"
                },
                {
                    "name": "pi1toppm",
                    "content": "convert Atari Degas .pi1 to PPM\n"
                },
                {
                    "name": "ppmtopi1",
                    "content": "convert PPM to Atari Degas .pi1\n"
                },
                {
                    "name": "picttoppm",
                    "content": "convert Macintosh PICT to PPM\n"
                },
                {
                    "name": "ppmtopict",
                    "content": "convert PPM to Macintosh PICT\n"
                },
                {
                    "name": "qrttoppm",
                    "content": "convert QRT ray-tracer output to PPM\n"
                },
                {
                    "name": "rawtoppm",
                    "content": "convert raw RGB bytes to PPM\n"
                },
                {
                    "name": "sldtoppm",
                    "content": "convert an AutoCAD slide file into a PPM\n"
                },
                {
                    "name": "spctoppm",
                    "content": "convert Atari compressed Spectrum to PPM\n"
                },
                {
                    "name": "sputoppm",
                    "content": "convert Atari uncompressed Spectrum to PPM\n"
                },
                {
                    "name": "tgatoppm",
                    "content": "convert TrueVision Targa file to PPM\n"
                },
                {
                    "name": "ppmtotga",
                    "content": "convert PPM to TrueVision Targa file\n"
                },
                {
                    "name": "ximtoppm",
                    "content": "convert Xim to PPM\n"
                },
                {
                    "name": "xpmtoppm",
                    "content": "convert XPM format to PPM\n"
                },
                {
                    "name": "ppmtoxpm",
                    "content": "convert PPM to XPM format\n"
                },
                {
                    "name": "yuvtoppm",
                    "content": "convert Abekas YUV format to PPM\n"
                },
                {
                    "name": "eyuvtoppm",
                    "content": "convert Encoder/Berkeley YUV format to PPM\n"
                },
                {
                    "name": "ppmtoeyuv",
                    "content": "convert PPM to Encoder/Berkeley YUV format\n"
                },
                {
                    "name": "ppmtoyuv",
                    "content": "convert PPM to Abekas YUV format\n"
                },
                {
                    "name": "ppmtoyuvsplit",
                    "content": "convert PPM to 3 subsampled raw YUV files\n"
                },
                {
                    "name": "yuvsplittoppm",
                    "content": "merge 3 subsampled raw YUV files to one PPM\n"
                },
                {
                    "name": "ppmtoacad",
                    "content": "convert PPM to AutoCAD database or slide\n"
                },
                {
                    "name": "ppmtoicr",
                    "content": "convert PPM to NCSA ICR graphics\n"
                },
                {
                    "name": "ppmtopcx",
                    "content": "convert PPM to PC Paintbrush format\n"
                },
                {
                    "name": "ppmtopgm",
                    "content": "convert PPM to portable graymap\n"
                },
                {
                    "name": "ppmtopuzz",
                    "content": "convert PPM to X11 \"puzzle\" file\n"
                },
                {
                    "name": "rasttopnm",
                    "content": "convert Sun raster file to Netpbm formats\n"
                },
                {
                    "name": "pnmtorast",
                    "content": "convert Netpbm formats to Sun raster file\n"
                },
                {
                    "name": "tifftopnm",
                    "content": "convert TIFF file to portable anymap\n"
                },
                {
                    "name": "pnmtotiff",
                    "content": "convert Netpbm formats to TIFF RGB file\n"
                },
                {
                    "name": "pnmtotiffcmyk",
                    "content": "convert Netpbm formats to TIFF CMYK file\n"
                },
                {
                    "name": "xwdtopnm",
                    "content": "convert X10 or X11 window dump to Netpbm formats\n"
                },
                {
                    "name": "pnmtoxwd",
                    "content": "convert Netpbm formats to X11 window dump\n"
                },
                {
                    "name": "pnmtoplainpnm",
                    "content": "convert regular Netpbm format image into plain Netpbm format\n"
                },
                {
                    "name": "pbmtopgm",
                    "content": "convert PBM file to PGM by averaging areas\n"
                },
                {
                    "name": "411toppm",
                    "content": "convert 411 (Sony Mavica) to PPM\n"
                },
                {
                    "name": "ppmtosixel",
                    "content": "convert PPM to DEC sixel format\n"
                },
                {
                    "name": "ppmtouil",
                    "content": "convert PPM to Motif UIL icon file\n"
                },
                {
                    "name": "sbigtopgm",
                    "content": "convert Santa Barbara Instrument Group CCD file to PGM\n"
                },
                {
                    "name": "vidtoppm",
                    "content": "convert Parallax XVideo JPEG to sequence of PPM files\n"
                },
                {
                    "name": "pnmtorle",
                    "content": "convert PNM to Utah Raster Toolkit (urt/rle) file\n"
                },
                {
                    "name": "rletopnm",
                    "content": "convert Utah Raster Toolkit (urt/rle) file to PNM\n"
                },
                {
                    "name": "ppmtoleaf",
                    "content": "convert PPM to Interleaf\n"
                },
                {
                    "name": "leaftoppm",
                    "content": "convert Interleaf to PPM\n"
                },
                {
                    "name": "bioradtopgm",
                    "content": "convert Biorad confocal image to PGM\n"
                },
                {
                    "name": "pbmtoln03",
                    "content": "convert PGM image to Dec LN03+ Sixel image\n"
                },
                {
                    "name": "pbmtopk",
                    "content": "convert PBM image to packed format (PK) font\n"
                },
                {
                    "name": "pktopbm",
                    "content": "convert packed format (PK) font to PBM image\n\n"
                },
                {
                    "name": "Image Generators",
                    "content": "All of these generate Netpbm format output.\n\n"
                },
                {
                    "name": "pbmmake",
                    "content": "create a blank PBM image of a specified size\n"
                },
                {
                    "name": "ppmmake",
                    "content": "create a PPM image of a specified size and color\n"
                },
                {
                    "name": "pgmramp",
                    "content": "generate a grayscale ramp\n\nppmpat create a pretty PPM image\n"
                },
                {
                    "name": "ppmrainbow",
                    "content": "create a spectrum-like image with colors fading together.\n"
                },
                {
                    "name": "pgmnoise",
                    "content": "create a PGM image of white noise\n"
                },
                {
                    "name": "pbmtext",
                    "content": "render text into a PBM image\n\npbmupc create a Universal Product Code PBM image\n\nppmcie generate a CIE color map PPM image\n"
                },
                {
                    "name": "pbmpage",
                    "content": "create a printer test pattern page in PBM format\n"
                },
                {
                    "name": "ppmcolors",
                    "content": "create a color map (PPM image) containing all possible colors of given maxval\n\n\n"
                },
                {
                    "name": "Image Editors",
                    "content": "All of these work on the Netpbm formats\n\n"
                },
                {
                    "name": "ppmlabel",
                    "content": "Add text to an image\n"
                },
                {
                    "name": "pnmshadow",
                    "content": "add a shadow to an image so it looks like it's floating\n"
                },
                {
                    "name": "ppmbrighten",
                    "content": "brighten or dim an image -- change saturation and value\n\nppmdim dim an image - different way from ppmbrighten\n"
                },
                {
                    "name": "pbmreduce",
                    "content": "reduce a PBM N times, using Floyd-Steinberg\n"
                },
                {
                    "name": "pgmnorm",
                    "content": "normalize contrast in a PGM image\n"
                },
                {
                    "name": "ppmnorm",
                    "content": "normalize contrast in a PPM image\n"
                },
                {
                    "name": "pbmpscale",
                    "content": "enlarge a PBM image with edge smoothing\n"
                },
                {
                    "name": "pnmscale",
                    "content": "scale an image with high precision\n"
                },
                {
                    "name": "pnmscalefixed",
                    "content": "scale an image quickly with low precision\n"
                },
                {
                    "name": "pnmenlarge",
                    "content": "enlarge an image N times\n"
                },
                {
                    "name": "ppmdither",
                    "content": "ordered dither for color images\n"
                },
                {
                    "name": "pnmcolormap",
                    "content": "Choose the N best colors to represent an image; create a colormap\n"
                },
                {
                    "name": "pnmremap",
                    "content": "Replace colors in an image with those from a color map\n"
                },
                {
                    "name": "ppmquant",
                    "content": "quantize colors in a color image down to fewer colors\n"
                },
                {
                    "name": "pnmquant",
                    "content": "quantize colors/shades in a color or grayscale image down to fewer\n"
                },
                {
                    "name": "ppmquantall",
                    "content": "quantize colors on many files\n"
                },
                {
                    "name": "ppmrelief",
                    "content": "run a Laplacian Relief filter on a PPM\n"
                },
                {
                    "name": "pnmarith",
                    "content": "perform arithmetic on two images\n\npnmcat concatenate images\n\npnmpad add borders to an image\n"
                },
                {
                    "name": "pnmcomp",
                    "content": "create composite (overlay) of images\n\nppmmix mix (overlay) two images.\n"
                },
                {
                    "name": "pnmcrop",
                    "content": "crop all like-colored borders off an image\n\npamcut select a rectangular region from an image\n\npnmcut obsolete version of pamcut (kept because it may have fewer bugs)\n"
                },
                {
                    "name": "pamdice",
                    "content": "slice an image into many horizontally and/or vertically\n"
                },
                {
                    "name": "pamdeinterlace",
                    "content": "remove every other row from an image\n"
                },
                {
                    "name": "pamchannel",
                    "content": "extract a single plane (channel, e.g. R, G, or B) from an image\n"
                },
                {
                    "name": "pnmdepth",
                    "content": "change the maxval in an image\n"
                },
                {
                    "name": "pnmflip",
                    "content": "perform one or more flip operations on an image\n"
                },
                {
                    "name": "pamstretch",
                    "content": "scale up an image by inserting interpolated pixels\n"
                },
                {
                    "name": "pamstretch-gen",
                    "content": "scale by non-integer values using pamstretch and pnmscale\n"
                },
                {
                    "name": "pnminvert",
                    "content": "invert an image\n"
                },
                {
                    "name": "pnmgamma",
                    "content": "perform gamma correction on an image\n"
                },
                {
                    "name": "pnmhisteq",
                    "content": "histogram equalize image to increase contrast\n"
                },
                {
                    "name": "pnmmargin",
                    "content": "add a margin to an image\n"
                },
                {
                    "name": "pnmpaste",
                    "content": "paste a rectangle into an image\n"
                },
                {
                    "name": "pnmrotate",
                    "content": "rotate an image\n"
                },
                {
                    "name": "pnmshear",
                    "content": "shear an image\n"
                },
                {
                    "name": "pnmsmooth",
                    "content": "smooth am image\n"
                },
                {
                    "name": "pnmtile",
                    "content": "replicate an image into a specified size\n"
                },
                {
                    "name": "pbmclean",
                    "content": "remove lone pixels (snow) from a PBM image\n"
                },
                {
                    "name": "pnmalias",
                    "content": "antialias an image\n"
                },
                {
                    "name": "ppmchange",
                    "content": "change all of one color to another in PPM image\n"
                },
                {
                    "name": "pnmnlfilt",
                    "content": "filter an image by replacing each pixel with a function of nearby pixels\n"
                },
                {
                    "name": "ppmshift",
                    "content": "shift lines of PPM image left or right a random amount\n"
                },
                {
                    "name": "ppmspread",
                    "content": "move pixels of PPM image a random amount\n"
                },
                {
                    "name": "pnmconvol",
                    "content": "general MxN convolution on an image\n"
                },
                {
                    "name": "rgb3toppm",
                    "content": "combine three portable graymaps into one PPM\n"
                },
                {
                    "name": "ppmtorgb3",
                    "content": "separate a PPM into three portable graymaps\n"
                },
                {
                    "name": "pbmlife",
                    "content": "apply Conway's rules of Life to a PBM image\n"
                },
                {
                    "name": "ppmdist",
                    "content": "map colors to high contrast grayscales arbitrarily\n"
                },
                {
                    "name": "ppmntsc",
                    "content": "adjust colors so they are legal for NTSC or PAL television\n\n\n"
                },
                {
                    "name": "Image Analyzers",
                    "content": "These all work on the Netpbm formats as input.\n\n"
                },
                {
                    "name": "pnmfile",
                    "content": "describe an image's vital characteristics\n"
                },
                {
                    "name": "pnmpsnr",
                    "content": "measure difference between two images\n"
                },
                {
                    "name": "pgmedge",
                    "content": "edge-detect a PGM image\n"
                },
                {
                    "name": "pgmenhance",
                    "content": "edge-enhance a PGM image\n"
                },
                {
                    "name": "pgmslice",
                    "content": "print grayscale values for a row or column of a PGM image\n"
                },
                {
                    "name": "pgmtexture",
                    "content": "calculate textural features on a PGM image\n"
                },
                {
                    "name": "pgmhist",
                    "content": "print a histogram of the values in a PGM image\n"
                },
                {
                    "name": "ppmhist",
                    "content": "print a histogram of a PPM\n"
                },
                {
                    "name": "pnmhistmap",
                    "content": "draw a histogram of a PGM or PPM\n"
                },
                {
                    "name": "ppmtomap",
                    "content": "generate a map of all colors in an image\n\nppm3d  generate a blue/green 3D glasses image from two images\n\n"
                },
                {
                    "name": "Miscellaneous",
                    "content": ""
                },
                {
                    "name": "ppmsvgalib",
                    "content": "display a PPM image on a Linux virtual console using Svgalib\n"
                },
                {
                    "name": "pbmmask",
                    "content": "create a mask bitmap from a regular bitmap\n"
                },
                {
                    "name": "ppmcolormask",
                    "content": "create mask of areas of a certain color in an image\n"
                },
                {
                    "name": "pnmsplit",
                    "content": "split a multi-image Netpbm file into multiple 1-image files\n"
                },
                {
                    "name": "pnmindex",
                    "content": "build a visual index of a bunch of Netpbm images\n"
                },
                {
                    "name": "pcdindex",
                    "content": "build a visual index of a photo CD from PCD overview file\n"
                },
                {
                    "name": "pnmmontage",
                    "content": "build multiple Netpbm images into a single montage image\n"
                },
                {
                    "name": "pgmbentley",
                    "content": "Bentleyize a PGM image\n"
                },
                {
                    "name": "pgmcrater",
                    "content": "create cratered terrain by fractal forgery\n\npamoil turn a PNM or PAM image into an oil painting\n"
                },
                {
                    "name": "ppmforge",
                    "content": "fractal forgeries of clouds, planets, and starry skies\n"
                },
                {
                    "name": "pgmkernel",
                    "content": "generate a convolution kernel\n\nppmtv  Make an image lined so it looks like an old TV\n"
                },
                {
                    "name": "pbmto4425",
                    "content": "Display PBM image on AT&T 4425 ASCII terminal with gfx chars\n\n"
                },
                {
                    "name": "Uncatalogued As Yet",
                    "content": ""
                },
                {
                    "name": "pnmtoddif",
                    "content": ""
                },
                {
                    "name": "pnmtosgi",
                    "content": ""
                },
                {
                    "name": "pnmtosir",
                    "content": ""
                },
                {
                    "name": "ppmflash",
                    "content": ""
                },
                {
                    "name": "ppmqvga",
                    "content": ""
                },
                {
                    "name": "ppmtomitsu",
                    "content": ""
                },
                {
                    "name": "ppmtopjxl",
                    "content": ""
                },
                {
                    "name": "sgitopnm",
                    "content": ""
                },
                {
                    "name": "sirtopnm",
                    "content": ""
                },
                {
                    "name": "spottopgm",
                    "content": ""
                },
                {
                    "name": "xvminitoppm",
                    "content": ""
                },
                {
                    "name": "zeisstopnm",
                    "content": ""
                },
                {
                    "name": "The Netpbm Libraries",
                    "content": "The Netpbm programming libraries, libpbm(3), libpgm(3), libppm(3),  and  libpnm(3),  make  it\neasy  to  write  programs that manipulate graphic images.  Their main function is to read and\nwrite files in the Netpbm format, and because the Netpbm package contains converters for  all\nthe  popular  graphics  formats, if your program reads and writes the Netpbm formats, you can\nuse it with any formats.\n\nBut the libraries also  contain  some  utility  functions,  such  as  character  drawing  and\nRGB/YCrCb conversion.\n\nThe  libraries have the conventional C linkage.  Virtually all programs in the Netpbm package\nare based on the Netpbm libraries.\n\n\n"
                },
                {
                    "name": "Application Notes",
                    "content": "As a collection of primitive tools, the power of Netpbm is multiplied by the power of all the\nother  unix  tools  you can use with them.  These notes remind you of some of the more useful\nways to do this.  Often, when people want to add high level functions to  the  Netpbm  tools,\nthey have overlooked some existing tool that, in combination with Netpbm, already does it.\n\nOften, you need to apply some conversion or edit to a whole bunch of files.\n\nAs  a rule, Netpbm programs take one input file and produce one output file, usually on Stan‐\ndard Output.  This is for flexibility, since you so often have to  pipeline  many  tools  to‐\ngether.\n\nHere  is an example of a shell command to convert all your of PNG files (named *.png) to JPEG\nfiles named *.jpg:\n\nfor i in *.png; do pngtopnm $i | ppmtojpeg >`basename $i .png`.jpg; done\n\nOr you might just generate a stream of individual shell commands, one per file, with  awk  or\nperl.   Here's  how to brighten 30 YUV images that make up one second of a movie, keeping the\nimages in the same files:\n\nls *.yuv .br | perl -ne 'chomp;\nprint yuvtoppm $ | ppmbrighten -v 100 | ppmtoyuv >tmp$$.yuv; ,\nmv tmp$$.yuv $0"
                },
                {
                    "name": "' .br | sh",
                    "content": "The tools find (with the -exec option) and xargs are also useful for simple  manipulation  of\ngroups of files.\n\nSome  shells' \"process substitution\" facility can help where a non-Netpbm program expects you\nto identify a disk file for input and you want it to use the result of a Netpbm manipulation.\nSay printcmyk takes the filename of a Tiff CMYK file as input and what you have is a PNG file\nabc.png.  Try:\n"
                },
                {
                    "name": "printcmyk <({ pngtopnm abc.png | pnmtotiffcmyk ; })",
                    "content": "It works in the other direction too, if you have a program that makes  you  name  its  output\nfile and you want the output to go through a Netpbm tool.\n\n"
                },
                {
                    "name": "Other Graphics Software",
                    "content": "Netpbm contains primitive building blocks.  It certainly is not a complete graphics library.\n\nThe  first  thing you will need to make use of any of these tools is a viewer.  For the X in‐\nclined, there is xzgv.  See ftp://metalab.unc.edu/pub/Linux/apps/graphics/viewers/X.\n\nxloadimage and its extension xli are also common ways to display a graphic image in X.\n\nImageMagick is like a visual version of Netpbm.  Using the X/Window system on Unix,  you  can\ndo basic editing of images and lots of format conversions.  The package does include at least\nsome non-visual tools.  Convert, Mogrify, Montage, and Animate are popular programs from  the\nImageMagick package.  ImageMagick runs on Unix, Windows, Windows NT, Macintosh, and VMS.\n\nThe  Gimp  is  a visual image editor for Unix and X, in the same category as the more famous,\nless  capable,  and  much  more  expensive  Adobe   Photoshop,   etc.   for   Windows.    See\nhttp://www.gimp.org.\n\nThe  file  program looks at a file and tells you what kind of file it is.  It recognizes most\nof the graphics formats with which Netpbm deals, so it is pretty  handy  for  graphics  work.\nNetpbm's anytopnm program depends on file.  See ftp://ftp.astron.com/pub/file.\n\nThe  Utah Raster Toolkit serves a lot of the same purpose as Netpbm, but without the emphasis\non format conversions.  This package is based on the RLE format, which you can convert to and\nfrom the Netpbm formats.  http://www.cs.utah.edu/research/projects/alpha1/urt.html gives some\ninformation on the Utah Raster Toolkit, but does not tell where to get it.\n\n\nThere are some Netpbm-like graphics tools distributed by the Army High Performance  Computing\nResearch  Center  at http://www.arc.umn.edu/gvl-software/media-tools.html.  These operate di‐\nrectly on non-Netpbm format images, so they aren't included in the Netpbm package.   However,\nyou can use them with any image format by using the Netpbm format converters.\n\n\nIvtools  is  a  suite of free X Windows drawing editors for Postscript, Tex, and web graphics\nproduction, as well as an embeddable and extendable vector graphic shell.  It uses the Netpbm\nfacilities.  See http://www.ivtools.org.\n\nIlib is a C subroutine library with functions for adding text to an image (as you might do at\na higher level with pbmtext, pnmcomp, etc.).  It works with Netpbm input and output.  Find it\nat  http://www.radix.net/~cknudsen/Ilib.  Netpbm also includes character drawing functions in\nthe libppm library, but they do not have as fancy font capabilities (see ppmlabel for an  ex‐\nample of use of the Netpbm character drawing functions).\n\nGD  is a library of graphics routines that is part of PHP.  It has a subset of Netpbm's func‐\ntions and has been found to resize images more slowly and with less quality.\n\npnm2ppa converts to HP's \"Winprinter\" format (for HP 710, 720, 820, 1000, etc).  It is a  su‐\nperset  of  Netpbm's  pbmtoppa and handles, notably, color.  However, it is more of a printer\ndriver  than  a  Netpbm-style  primitive  graphics  building   block.    See   http://source‐‐\nforge.net/project/?groupid=1322.\n\nThe  program  morph  morphs one image into another.  It uses Targa format images, but you can\nuse tgatoppm and ppmtotga to deal with that format.  You have to  use  the  graphical  (X/Tk)\nXmorph  to  create  the  mesh files that you must feed to morph.  morph is part of the Xmorph\npackage.  See http://www.colorado-research.com/~gourlay/software/Graphics/Xmorph.\n\nTo create an animated GIF, or extract a frame from one, use gifsicle.  gifsicle converts  be‐\ntween  animated GIF and still GIF, and you can use ppmtogif and giftopnm to connect up to all\nthe Netpbm utilities.  See http://www.lcdf.org/gifsicle.\n\nTo convert an image of text to text (optical character recongition - OCR), use gocr (think of\nit as an inverse of pbmtext).  See http://altmark.nat.uni-magdeburg.de/~jschulen/ocr/.\n\nhttp://schaik.com/pngsuite  contains a PNG test suite -- a whole bunch of PNG images exploit‐\ning the various features of the PNG format.\n\nAnother version of pnmtopng/pngtopnm is at http://www.schaik.com/png/pnmtopng.html.  The ver‐\nsion in Netpbm was actually based on that package a long time ago, and you can expect to find\nbetter exploitation of the PNG format, especially recent enhancements, in that  package.   It\nmay  be a little less consistent with the Netpbm project and less exploitive of recent Netpbm\nformat enhancements, though.\n\njpegtran Does some of the same transformations as Netpbm is famous for, but does them specif‐\nically  on JPEG files and does them without loss of information.  By contrast, if you were to\nuse Netpbm, you would first decompress the JPEG image to Netpbm format,  then  transform  the\nimage,  then compress it back to JPEG format.  In that recompression, you lose a little image\ninformation because JPEG is a lossy compression.  jpegtran comes with  the  Independent  Jpeg\nGroup's (http://www.ijg.org) JPEG library.\n\nSome  tools to deal with EXIF files (see also Netpbm's jpegtopnm and pnmtojpeg): To dump (in‐\nterpret) an EXIF header: Exifdump ((http://topo.math.u-psud.fr/~bousch/exifdump.py) or  Jhead\n(http://www.sentex.net/~mwandel/jhead).\n\nA Python EXIF library and dumper:  http://pyexif.sourceforge.net.\n\nLatex2html  converts  Latex  document  source to HTML document source.  Part of that involves\ngraphics, and Latex2html uses Netpbm tools for some of that.  But Latex2html through its his‐\ntory  has had some rather esoteric codependencies with Netpbm.  Older Latex2html doesn't work\nwith current Netpbm.  Latex2html-99.2beta8 works, though.\n\n\n"
                },
                {
                    "name": "Other Graphics Formats",
                    "content": "People never seem to tire of inventing new graphics formats, often completely redundant  with\npre-existing  ones.   Netpbm  cannot keep up with them.  Here is a list of a few that we know\nNetpbm does not handle (yet).\n\nCAL (originated by US Department Of  Defense,  favored  by  architects).   http://www.land‐\nfield.com/faqs/graphics/fileformats-faq/part3/section-24.html\n\narray formats dx, general, netcdf, CDF, hdf, cm\n\nCGM+\n\nWindows  Meta  File (.WMF).  Libwmf converts from WMF to things like Latex, PDF, PNG.  Some\nof these can be input to Netpbm.\n\nMicrosoft Word, RTF.  Microsoft keeps a proprietary hold on these  formats.   Any  software\nyou see that can handle them is likely to cost money.\n\nDXF (AutoCAD)\n\n"
                }
            ]
        },
        "HISTORY": {
            "content": "Netpbm  has  a long history, starting with Jef Poskanzer's Pbmplus package in 1988.  The file\nHISTORY in the Netpbm source code contains a historical overview as well as a  detailed  his‐\ntory release by release.\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Netpbm  is based on the Pbmplus package by Jef Poskanzer, first distributed in 1988 and main‐\ntained by him until 1991.  But the package contains work by countless  other  authors,  added\nsince Jef's original work.  In fact, the name is derived from the fact that the work was con‐\ntributed by people all over the world via the Internet, when  such  collaboration  was  still\nnovel enough to merit naming the package after it.\n\nBryan  Henderson  has  been  maintaining Netpbm since 1999.  In addition to packaging work by\nothers, Bryan has also written a significant amount of new material for the package.\n\n\n\n\n\nnetpbm(1)",
            "subsections": []
        }
    },
    "summary": "netpbm - package of graphics manipulation programs and libraries",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "(To be precise, this only works to the extent that the program in question implements the Netpbm convention of issuing all informational messages via the pmmessage() ser‐ vice of the Netpbm libraries)."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Instead of doing anything else, report the version of the libpbm library linked with the program (it may have been linked statically into the program, or dynamically linked at run time). Normally, the Netpbm programs and the libraries are installed at the same time, so this tells you the version of the program and all the other Netpbm libraries and files it uses as well. Here is a directory of the Netpbm programs. You can also use man -k to search for a program that does what you want."
        }
    ],
    "examples": [],
    "see_also": []
}