{
    "mode": "man",
    "parameter": "pnmalias",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmalias/1/json",
    "generated": "2026-08-31T18:23:38Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "pnmalias - antialias a PNM image\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "pnmalias",
                    "content": "[-bgcolor color]\n\n[-fgcolor color]\n\n[-bonly]\n\n[-fonly]\n\n[-balias]\n\n[-falias]\n\n[-weight w]\n\n[pnmfile]\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npnmalias  reads  a PNM image as input, and applies anti-aliasing to background and foreground\npixels.  If the input file is a PBM, pnmalias promotes the output  anti-aliased  image  to  a\nPGM, and prints a message informing the user of the change in format.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), pnmalias recognizes the following command line options:\n",
            "subsections": [
                {
                    "name": "-bgcolor _",
                    "content": ""
                },
                {
                    "name": "-fgcolor _",
                    "content": "Pixels with these values will be anti-aliased.  By default,  pnmalias  takes  the  background\ncolor to be black, and foreground color to be white.\n\nSpecify  the color (color) as described for the \u001b]8;;libnetpbmimage.html#colorname\u001b\\argument of the pnmparsecolor() library rou‐\ntine\u001b]8;;\u001b\\ .\n\nNote that even when dealing with PGMs, background and foreground colors need to be  specified\nin  the  fashion described above.  In this case, pnmalias takes the background and foreground\npixel values to be the value of the red component for the specified color.\n"
                },
                {
                    "name": "-bonly",
                    "content": ""
                },
                {
                    "name": "-fonly",
                    "content": ""
                },
                {
                    "name": "-balias",
                    "content": ""
                },
                {
                    "name": "-falias",
                    "content": "If you specify neither -balias nor -falias, pnmalias applies anti-aliasing only among  neigh‐\nboring background and foreground pixels.\n"
                },
                {
                    "name": "-weight _",
                    "content": "ber in the range 0 < w < 1.  The lower the value of w is, the \"blurrier\" the output image is.\nThe default is w = 1/3.\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "pbmtext(1), pnmsmooth(1), pnm(1)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1992 by Alberto Accomazzi, Smithsonian Astrophysical Observatory.\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pnmalias.html\n\nnetpbm documentation                        15 March 2004                    Pnmalias User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pnmalias - antialias a PNM image",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Pixels with these values will be anti-aliased. By default, pnmalias takes the background color to be black, and foreground color to be white. Specify the color (color) as described for the \u001b]8;;libnetpbmimage.html#colorname\u001b\\argument of the pnmparsecolor() library rou‐ tine\u001b]8;;\u001b\\ . Note that even when dealing with PGMs, background and foreground colors need to be specified in the fashion described above. In this case, pnmalias takes the background and foreground pixel values to be the value of the red component for the specified color."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If you specify neither -balias nor -falias, pnmalias applies anti-aliasing only among neigh‐ boring background and foreground pixels."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "ber in the range 0 < w < 1. The lower the value of w is, the \"blurrier\" the output image is. The default is w = 1/3."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pbmtext",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pbmtext/1/json"
        },
        {
            "name": "pnmsmooth",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmsmooth/1/json"
        },
        {
            "name": "pnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Apply antialiasing onto a PNM image.",
        "examples": [
            {
                "description": "Perform antialiasing on a PNM image, taking black pixels as background and white pixels as foreground",
                "command": "pnmalias {{path/to/input.pnm}} > {{path/to/output.ppm}}"
            },
            {
                "description": "Explicitly specify the background and foreground color",
                "command": "pnmalias -bcolor {{background_color}} -fcolor {{foreground_color}} {{path/to/input.pnm}} > {{path/to/output.ppm}}"
            },
            {
                "description": "Apply altialiasing to foreground pixels only",
                "command": "pnmalias {{-fo|-fonly}} {{path/to/input.pnm}} > {{path/to/output.ppm}}"
            },
            {
                "description": "Apply antialiasing to all surrounding pixels of background pixels",
                "command": "pnmalias {{-ba|-balias}} {{path/to/input.pnm}} > {{path/to/output.ppm}}"
            }
        ]
    }
}