PAMENLARGE(1)
π PAMENLARGE π
ok so bestie, welcome to the Pamenlarge User Manual, part of the General Commands Manual lineup β she's a real one. pull up a chair, grab a strawberry π, and let's get into it.
β¨ NAME β¨
pamenlarge β Enlarge a Netpbm image N times by duplicating pixels π
πΈ SYNOPSIS πΈ
pamenlarge [-scale=integer] [-xscale=integer] [-yscale=integer]
[filename]
pamenlarge N [pnmfile]
π DESCRIPTION π
okay so first things first: this program is part of Netpbm(1). she's got a whole family, iykyk.
pamenlarge reads a Netpbm image as input, replicates its pixels N times, and produces a Netpbm image as output. literally just copy-paste energy but for pixels π
. the output is the same type of image as the input β no format glow-ups happening here.
ngl if you're enlarging by a factor of 3 or more, you should probably add a pnmsmooth step after; otherwise you can literally see the original pixels in the resulting image π. it's giving pixelated. no cap.
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 significantly 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 example, 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 π the dark ages fr fr.
pamenlarge can enlarge only by integer factors. the slower but more general pamscale can enlarge or reduce by arbitrary factors. pamscale allows you to enlarge by resampling, which gives you smoother enlargements β but it is much slower. she's thorough, not speedy π.
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. queen of efficiency β¨.
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). either way, we support you π«Ά.
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. periodt.
π OPTIONS π
in addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamenlarge recognizes the following command line options:
-scale=integer β specifies the scale factor, both horizontal and vertical, all in one lil package π-xscale=integer β specifies the horizontal scale factor-yscale=integer β specifies the vertical scale factor
okay so here's the tea on those three: -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 -xscale.
π¨ you cannot specify-scaleand also-xscaleoryscale. pick a lane bestie.
also: you must specify at least one of these options, unless you use the deprecaated method of specifying the scale factor via argument. (yep, "deprecaated" β typo and all, we keep the lore intact π)
these options were all new in Netpbm 10.86 (March 2019). before that, use the scale argument. vintage behaviour only β¨.
π HISTORY π
pamenlarge was new in Netpbm 10.25 (October 2004). it is designed as a replacement for pnmenlarge 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. glow up complete.
π SEE ALSO π
pbmreduce(1), pamscale(1), pamstretch(1), pbmpscale(1), pnmsmooth(1), pnm(1)
the whole friend group, go say hi π
π«Ά 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
and that's the whole thing, bestie π this lil icon is brought to you by netpbm documentation, dated 07 January 2019 β she's serving Pamenlarge User Manual(1) and honestly? obsessed. go enlarge smth. slay π¦β¨
π¦ where this page comes from
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms