{
    "mode": "man",
    "parameter": "ppmshift",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/ppmshift/1/json",
    "generated": "2026-09-24T12:31:56Z",
    "synopsis": "ppmshift shift [ppmfile]",
    "sections": {
        "NAME": {
            "content": "ppmshift - shift lines of a PPM image left or right by a random amount\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "ppmshift shift [ppmfile]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\nppmshift  reads a PPM image as input.  It shifts every row of image data to the left or right\nby a random amount, within a range of shift pixels.  The random distribution is uniform, cen‐\ntered at zero movement.\n\nThe randomness in the image is limited before Netpbm 10.37 (December 2006) -- if you run  the\nprogram twice in the same second, you may get identical output.\n\nThis  is an effect the author intended to use for MPEG tests.  Unfortunately, this program is\nnot useful for that - it creates too random patterns to be used for  animations.   Still,  it\nmight give interesting results on still images.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "There  are  no  command line options defined specifically for ppmshift, but it recognizes the\noptions common to all programs based on libnetpbm (See \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ .)\n\n",
            "subsections": []
        },
        "EXAMPLE": {
            "content": "Check this out: Save your favorite model's  picture  from  something  like  alt.binaries.pic‐\ntures.supermodels  (ok,  or from any other picture source), convert it to ppm, and process it\ne.g. like this, assuming the picture is 800x600 pixels:\n\n#take the upper half, and leave it like it is\npamcut -top=0 -width=800 -height=300 cs.ppm >upper.ppm\n\n#take the lower half, flip it upside down, dim it and distort it a little\npamcut -top=300 -width=800 -height=300 cs.ppm | \\\npamflip -topbottom | \\\nppmdim 0.7 | \\\nppmshift 10 >lower.ppm\n\n#and concatenate the two pieces\npamcat -topbottom upper.ppm lower.ppm >newpic.ppm\n\n\n\nThe resulting picture looks like the image being reflected on a  water  surface  with  slight\nripples.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ppm(1), pamcut(1), pamflip(1), ppmdim(1), pamcat(1)\n\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1993 by Frank Neumann\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/ppmshift.html\n\nnetpbm documentation                      20 November 2008                   Ppmshift User Manual(1)",
            "subsections": []
        }
    },
    "summary": "ppmshift - shift lines of a PPM image left or right by a random amount",
    "flags": [],
    "examples": [
        "Check this out: Save your favorite model's  picture  from  something  like  alt.binaries.pic‐",
        "tures.supermodels  (ok,  or from any other picture source), convert it to ppm, and process it",
        "e.g. like this, assuming the picture is 800x600 pixels:",
        "#take the upper half, and leave it like it is",
        "pamcut -top=0 -width=800 -height=300 cs.ppm >upper.ppm",
        "#take the lower half, flip it upside down, dim it and distort it a little",
        "pamcut -top=300 -width=800 -height=300 cs.ppm | \\",
        "pamflip -topbottom | \\",
        "ppmdim 0.7 | \\",
        "ppmshift 10 >lower.ppm",
        "#and concatenate the two pieces",
        "pamcat -topbottom upper.ppm lower.ppm >newpic.ppm",
        "The resulting picture looks like the image being reflected on a  water  surface  with  slight",
        "ripples."
    ],
    "see_also": [
        {
            "name": "ppm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppm/1/json"
        },
        {
            "name": "pamcut",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamcut/1/json"
        },
        {
            "name": "pamflip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamflip/1/json"
        },
        {
            "name": "ppmdim",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmdim/1/json"
        },
        {
            "name": "pamcat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamcat/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Shift the lines in a PPM image by a randomized amount.",
        "examples": [
            {
                "description": "Shift the lines in the input image by a randomized amount not exceeding s to the left or to the right",
                "command": "ppmshift {{s}} {{path/to/input_file.ppm}} > {{path/to/output_file.ppm}}"
            }
        ]
    }
}