{
    "mode": "man",
    "parameter": "pnmsmooth",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmsmooth/1/json",
    "generated": "2026-06-03T01:28:22Z",
    "synopsis": "pnmsmooth [-size width height] [-dump dumpfile] [pnmfile]",
    "sections": {
        "NAME": {
            "content": "pnmsmooth - smooth out an image\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pnmsmooth [-size width height] [-dump dumpfile] [pnmfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Smooths  out  an  image by replacing each pixel with the average of its width X height neigh‐\nbors.  It is implemented as a C progam that generates a PGM convolution matrix and  then  in‐\nvokes pnmconvol.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-size width height",
                    "content": "Specifies  the  size  of the convolution matrix.  Default size is a 3x3 matrix.  Width\nand height sizes must be odd.  Maximum size of convolution matrix is  limited  by  the\nmaximum  value  for a pixel such that (width * height * 2) must not exceed the maximum\npixel value.\n"
                },
                {
                    "name": "-dump dumpfile",
                    "content": "Generates and saves the convolution file only.  Use of this option does not invoke pn‐\nmconvol.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "pnmconvol(1), pnm(5)\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Copyright (C) 1989, 1991 by Jef Poskanzer.\nConverted from script to C program December 1994 by Mike Burns (burns@chem.psu.edu).\n\n\n\n4 December 1994                              pnmsmooth(1)",
            "subsections": []
        }
    },
    "summary": "pnmsmooth - smooth out an image",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Specifies the size of the convolution matrix. Default size is a 3x3 matrix. Width and height sizes must be odd. Maximum size of convolution matrix is limited by the maximum value for a pixel such that (width * height * 2) must not exceed the maximum pixel value."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Generates and saves the convolution file only. Use of this option does not invoke pn‐ mconvol."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pnmconvol",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmconvol/1/json"
        },
        {
            "name": "pnm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Smooth out a PNM image.",
        "examples": [
            {
                "description": "Smooth out a PNM image using a convolution matrix of size 3x3",
                "command": "pnmsmooth {{path/to/input.pnm}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Smooth out a PNM image using a convolution matrix of size width times height",
                "command": "pnmsmooth {{-w|-width}} {{width}} {{-h|-height}} {{height}} {{path/to/input.pnm}} > {{path/to/output.pnm}}"
            }
        ]
    }
}