pbmreduce - read a portable bitmap and reduce it N times
pbmreduce [-floyd|-fs|-threshold] [-value <val>] N [pbmfile]
Reads a portable bitmap as input. Reduces it by a factor of N, and produces a portable bitmap as output. By default, the halftoning after the reduction is done via boustrophedonic Floyd-Steinberg error diffusion; however, the -thresh flag can be used to specify simple thresholding. This gives better results when reducing line drawings. The -value flag alters the thresholding value for all quantizations. It should be a real number between 0 and 1. Above 0.5 means darker images; below 0.5 means lighter. All flags can be abbreviated to their shortest unique prefix.
Let a.pbm be a portable bitmap. The following command will reduce it by a factor of 2 and produce a GIF file with it: pbmmerge pbmreduce 2 a.pbm >ared2.pbm | ppmmerge ppmtogif >ared2.gif
BEFORE
AFTER
Reduced 2 times:
![]()
Reduced 3 times:
![]()
Reduced 4 times:
![]()
Reduced 6 times:
![]()
Reduced 8 times:
pnmenlarge(1), ppmscale(1), pgmtopbm(1), pbm(5)
Copyright (C) 1988 by Jef Poskanzer. 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.