This program is part of Netpbm.
pbmpscale reads a PBM image as input, and outputs a PBM image enlarged N times. pbmpscale does this enlargement by pixel replication, with some additional smoothing of corners and edges.
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.
pbmpscale works best for enlargements of 2. To do enlargements greater than 2, you should do as many enlargements of 2 as possible, then enlarge by the remaining factor.