{
    "mode": "man",
    "parameter": "pamenlarge",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pamenlarge/1/json",
    "generated": "2026-10-05T06:22:49Z",
    "synopsis": "pamenlarge [-scale=integer] [-xscale=integer] [-yscale=integer] [filename]\npamenlarge N [pnmfile]",
    "sections": {
        "NAME": {
            "content": "pamenlarge - Enlarge a Netpbm image N times by duplicating pixels\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pamenlarge [-scale=integer] [-xscale=integer] [-yscale=integer] [filename]\n\npamenlarge N [pnmfile]\n\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npamenlarge  reads  a  Netpbm  image  as  input, replicates its pixels N times, and produces a\nNetpbm image as output.  The output is the same type of image as the input.\n\nIf you enlarge by a factor of 3 or more, you should probably add a pnmsmooth step; otherwise,\nyou can see the original pixels in the resulting image.\n\nFor PBM images, pamenlarge uses special fast algorithms for scale  factors  up  to  10.   For\nlarger  factors,  it uses a simple but slow algorithm.  As a result, you can often get a sig‐\nnificantly faster scale by running pamenlarge multiple times.  For example,  enlarging  by  3\nand  then by 5 is faster than enlarging once by 15.  And because the algorithms are different\nfor the different scale factors, some faster than others, the order matters too.   For  exam‐\nple,  the  following examples all produce the same output -- an image 15 times bigger on edge\nthan the input -- but at different speeds, each being faster than the one before.\n\n$ pamenlarge -scale=15 test.pbm\n$ pamenlarge -scale=5 test.pbm | pamenlarge -scale=3\n$ pamenlarge -scale=3 test.pbm | pamenlarge -scale=5\n\n\nThe special fast cases for factors up to 10 have existed since Release  10.50  (March  2010).\nThe special cases for 1, 2, 3, and 5 go back to Release 10.41 (December 2007).  Before 10.41,\nthere are no special scale factors and PBM enlargement is significantly slower than today for\nall scale factors.\n\npamenlarge can enlarge only by integer factors.  The slower but more general pamscale can en‐\nlarge  or  reduce  by arbitrary factors.  pamscale allows you to enlarge by resampling, which\ngives you smoother enlargements.  But it is much slower.\n\npamstretch is another enlarging program that enlarges by integer factors.  It does  a  simple\nkind of resampling that gives you a smoothed enlargement with less computational cost.\n\npbmreduce can reduce by integer factors, but only for PBM images.\n\n",
            "subsections": []
        },
        "ARGUMENTS": {
            "content": "As  with  most  Netpbm programs, you can give the input file name as an argument or omit that\nargument and have it come from Standard Input (and you can specify '-' for  the  argument  to\nspecify Standard Input explicitly).\n\nYou  can  also  specify  the scale factor as an argument, for backward compatibility, but the\npreferred way to do that is with a -scale option, because it is easier to remember  and  read\nthat way.  The scale factor argument goes before the file name argument.\n\n\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,\nsee  Common Options ), pamenlarge recognizes the following command line options:\n\n\n",
            "subsections": [
                {
                    "name": "-scale=_",
                    "content": ""
                },
                {
                    "name": "-xscale=_",
                    "content": ""
                },
                {
                    "name": "-yscale=_",
                    "content": "These specify the scale  factor.   -xscale  specifies  the  horizontal  scale  factor;\n-yscale specifies the vertical scale factor and -scale specifies both.\n\nIf you specify -xscale but not -yscale, pamenlarge does not scale vertically (i.e. the\nvertical scale factor is 1).  The converse applies if you specify -yscale and not -xs‐\ncale.\n\nYou cannot specify -scale and also -xscale or yscale.\n\nYou  must specify at least one of these options, unless you use the deprecaated method\nof specifying the scale factor via argument.\n\nThese options were all new in Netpbm 10.86 (March 2019).  Before that, use  the  scale\nargument.\n\n\n\n\n"
                }
            ]
        },
        "HISTORY": {
            "content": "pamenlarge  was  new in Netpbm 10.25 (October 2004).  It is designed as a replacement for pn‐\nmenlarge by Jef Poskanzer, which was in Pbmplus as far back as 1989.  The major difference is\nthat pamenlarge can enlarge PAM format images in addition to PNM.\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pbmreduce(1), pamscale(1), pamstretch(1), pbmpscale(1), pnmsmooth(1), pnm(1)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1989 by Jef Poskanzer.\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/pamenlarge.html\n\nnetpbm documentation                       07 January 2019                 Pamenlarge User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pamenlarge - Enlarge a Netpbm image N times by duplicating pixels",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "These specify the scale factor. -xscale specifies the horizontal scale factor; -yscale specifies the vertical scale factor and -scale specifies both. If you specify -xscale but not -yscale, pamenlarge does not scale vertically (i.e. the vertical scale factor is 1). The converse applies if you specify -yscale and not -xs‐ cale. You cannot specify -scale and also -xscale or yscale. You must specify at least one of these options, unless you use the deprecaated method of specifying the scale factor via argument. These options were all new in Netpbm 10.86 (March 2019). Before that, use the scale argument."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pbmreduce",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pbmreduce/1/json"
        },
        {
            "name": "pamscale",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamscale/1/json"
        },
        {
            "name": "pamstretch",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamstretch/1/json"
        },
        {
            "name": "pbmpscale",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pbmpscale/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": "Enlarge a PAM image by duplicating pixels.",
        "examples": [
            {
                "description": "Enlarge the specified image by the specified factor",
                "command": "pamenlarge {{-s|-scale}} {{n}} {{path/to/image.pam}} > {{path/to/output.pam}}"
            },
            {
                "description": "Enlarge the specified image by the specified factors horizontally and vertically",
                "command": "pamenlarge {{-x|-xscale}} {{xn}} {{-y|-yscale}} {{yn}} {{path/to/image.pam}} > {{path/to/output.pam}}"
            }
        ]
    }
}