# man > pamenlarge(1)

> **TLDR:** Enlarge a PAM image by duplicating pixels.
>
- Enlarge the specified image by the specified factor:
  `pamenlarge {{-s|-scale}} {{n}} {{path/to/image.pam}} > {{path/to/output.pam}}`
- Enlarge the specified image by the specified factors horizontally and vertically:
  `pamenlarge {{-x|-xscale}} {{xn}} {{-y|-yscale}} {{yn}} {{path/to/image.pam}} > {{path/to/output.pam}}`

*Source: tldr-pages*

---

_Pamenlarge_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)              General Commands Manual             _Pamenlarge_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)

## NAME
       pamenlarge - Enlarge a Netpbm image N times by duplicating pixels


## SYNOPSIS
       **pamenlarge **[**-scale=_**integer_] [**-xscale=_**integer_] [**-yscale=_**integer_] [_filename_]

       **pamenlarge _**N_ [_pnmfile_]



## DESCRIPTION
       This program is part of [**Netpbm**(1)](https://www.chedong.com/phpMan.php/man/Netpbm/1/markdown).

       **pamenlarge  **reads  a  Netpbm  image  as  input, replicates its pixels _N_ times, and produces a
       Netpbm image as output.  The output is the same type of image as the input.

       If you enlarge by a factor of 3 or more, you should probably add a **pnmsmooth **step; otherwise,
       you can see the original pixels in the resulting image.

       For PBM images, **pamenlarge **uses special fast algorithms for scale  factors  up  to  10.   For
       larger  factors,  it uses a simple but slow algorithm.  As a result, you can often get a sig‐
       nificantly faster scale by running **pamenlarge **multiple times.  For example,  enlarging  by  3
       and  then by 5 is faster than enlarging once by 15.  And because the algorithms are different
       for the different scale factors, some faster than others, the order matters too.   For  exam‐
       ple,  the  following examples all produce the same output -- an image 15 times bigger on edge
       than the input -- but at different speeds, each being faster than the one before.

            $ pamenlarge -scale=15 test.pbm
            $ pamenlarge -scale=5 test.pbm | pamenlarge -scale=3
            $ pamenlarge -scale=3 test.pbm | pamenlarge -scale=5


       The special fast cases for factors up to 10 have existed since Release  10.50  (March  2010).
       The special cases for 1, 2, 3, and 5 go back to Release 10.41 (December 2007).  Before 10.41,
       there are no special scale factors and PBM enlargement is significantly slower than today for
       all scale factors.

       **pamenlarge **can enlarge only by integer factors.  The slower but more general **pamscale **can en‐
       large  or  reduce  by arbitrary factors.  **pamscale **allows you to enlarge by resampling, which
       gives you smoother enlargements.  But it is much slower.

       **pamstretch **is another enlarging program that enlarges by integer factors.  It does  a  simple
       kind of resampling that gives you a smoothed enlargement with less computational cost.

       **pbmreduce **can reduce by integer factors, but only for PBM images.


## ARGUMENTS
       As  with  most  Netpbm programs, you can give the input file name as an argument or omit that
       argument and have it come from Standard Input (and you can specify '-' for  the  argument  to
       specify Standard Input explicitly).

       You  can  also  specify  the scale factor as an argument, for backward compatibility, but the
       preferred way to do that is with a **-scale **option, because it is easier to remember  and  read
       that way.  The scale factor argument goes before the file name argument.





## OPTIONS
       In  addition  to  the options common to all programs based on libnetpbm (most notably **-quiet**,
       see ]8;;index.html#commonoptions\ Common Options]8;;\ ), **pamenlarge **recognizes the following command line options:



### -scale=_

### -xscale=_

### -yscale=_
              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.





## HISTORY
       **pamenlarge  **was  new in Netpbm 10.25 (October 2004).  It is designed as a replacement for **pn‐**
       **menlarge **by Jef Poskanzer, which was in Pbmplus as far back as 1989.  The major difference is
       that **pamenlarge **can enlarge PAM format images in addition to PNM.



## SEE ALSO
       [**pbmreduce**(1)](https://www.chedong.com/phpMan.php/man/pbmreduce/1/markdown), [**pamscale**(1)](https://www.chedong.com/phpMan.php/man/pamscale/1/markdown), [**pamstretch**(1)](https://www.chedong.com/phpMan.php/man/pamstretch/1/markdown), [**pbmpscale**(1)](https://www.chedong.com/phpMan.php/man/pbmpscale/1/markdown), [**pnmsmooth**(1)](https://www.chedong.com/phpMan.php/man/pnmsmooth/1/markdown), [**pnm**(1)](https://www.chedong.com/phpMan.php/man/pnm/1/markdown)


## AUTHOR
       Copyright (C) 1989 by Jef Poskanzer.

## DOCUMENT SOURCE
       This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master
       documentation is at

              **<http://netpbm.sourceforge.net/doc/pamenlarge.html>**

netpbm documentation                       07 January 2019                 _Pamenlarge_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
