{
    "mode": "man",
    "parameter": "pnmrotate",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmrotate/1/json",
    "generated": "2026-05-30T05:16:17Z",
    "synopsis": "pnmrotate [-noantialias] angle [pnmfile]",
    "sections": {
        "NAME": {
            "content": "pnmrotate - rotate a portable anymap by some angle\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pnmrotate [-noantialias] angle [pnmfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads  a portable anymap as input.  Rotates it by the specified angle and produces a portable\nanymap as output.  If the input file is in color, the output will be too, otherwise  it  will\nbe  grayscale.  The angle is in degrees (floating point), measured counter-clockwise.  It can\nbe negative, but it should be between -90 and 90.  Also, for rotations greater  than  45  de‐\ngrees you may get better results if you first use pnmflip to do a 90 degree rotation and then\npnmrotate less than 45 degrees back the other direction\n\nThe rotation algorithm is Alan Paeth's three-shear method.   Each  shear  is  implemented  by\nlooping  over the source pixels and distributing fractions to each of the destination pixels.\nThis has an \"anti-aliasing\" effect - it avoids jagged edges and similar artifacts.   However,\nit also means that the original colors or gray levels in the image are modified.  If you need\nto keep precisely the same set of colors, you can use the -noantialias flag.  This  does  the\nshearing by moving pixels without changing their values.  If you want anti-aliasing and don't\ncare about the precise colors, but still need a limited *number* of colors, you can  run  the\nresult through ppmquant.\n\nAll flags can be abbreviated to their shortest unique prefix.\n",
            "subsections": []
        },
        "REFERENCES": {
            "content": "\"A  Fast  Algorithm  for  General Raster Rotation\" by Alan Paeth, Graphics Interface '86, pp.\n77-81.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pnmshear(1), pnmflip(1), pnm(5), ppmquant(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1989, 1991 by Jef Poskanzer.\n\n\n\n12 January 1991                              pnmrotate(1)",
            "subsections": []
        }
    },
    "summary": "pnmrotate - rotate a portable anymap by some angle",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "pnmshear",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmshear/1/json"
        },
        {
            "name": "pnmflip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmflip/1/json"
        },
        {
            "name": "pnm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
        },
        {
            "name": "ppmquant",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmquant/1/json"
        }
    ]
}