Short: Image scaling and dithering tool Author: Paul Sheer, Morphos port by Fabrizio "Lanch" Bartoloni Uploader: lanch tiscali it (Fabrizio Bartoloni) Type: gfx/pbm Architecture: ppc-morphos PTrans scales and dithers an image while holding only 2 scanlines in memory at a time. This allows extremely large images to be processed using very little RAM. PTRANS Copyright (C) 2008 Paul Sheer All rights reserved. - www.protonet.co.za - usage: ptrans [-multiply W,H] [-scale W,H] [-input FILENAME] [-gamma F] [-s F] [-threshold N] [-grayscale] [-float] [-output FILENAME] Produces PBM (i.e. P4) dithered output, or PGM (i.e. P5) gray-level output from PPM or PGM (P5 or P6) input. Reads/writes from/to stdin/out if -input/-output not specified -multiply makes bigger dots (try -multiply 3,3), -scale sets output width and height in pixels using linear interpolation. -gamma adjusts brightness F range 0.2 to 5.0 -s use S curve color adjustment F is gamma value of 0.2 to 5.0. Good for contrast adjustment. -s 1000.0 is equivalent to -threshold 32768 -threshold clips N range 0-65535 -float floating point interpolation -grayscale output P5 gray-level file, 1 byte per pixel Example: some HP printers can be used as an A4 photostat machine in combination with a scanner: scanimage -x 210 -y 297 --resolution 300 | ptrans -scale 3307,7014 -multiply 3,1 -s 1.2 | foo2xqx -g 9921x7014 -u 50x0 -r1200x600 -p9 -m1 -n1 -d1 -s7 -J -U -D0 > /dev/usblp0