Linux ports of hq3x and friends. These are fast, high quality
magnification filters for scaling images up 2x, 3x, or 4x. They are
particularly tuned for sprite graphics.

To compile, just run make on a modern Linux system. Note that the
compilation is quite slow because of gcc optimization.


Usage:
  pngtopnm screenshot.png | pnmhqxscale -3 | pnmtopng > screenshot3x.png

hq2x hq3x hq4x
  Tools that scale images 2x, 3x, 4x. Works on BMP or TGA files.
  Straight port of Maxim's code.

pnmhqxscale
  Analog of pnmscale for using hq?x. Accepts one option: -2, -3, or -4


Original code is by Maxim Stepin
  http://www.hiend3d.com/hq3x.html
Linux port and pnmhqx script by Nelson Minar <nelson@monkey.org> 2003-10-26
  http://www.nelson.monkey.org/~nelson/weblog/tech/hqNx

The Linux port is the minimal amount of work necessary to get it
working from Maxim's C++ sources. The pnmhqxscale script is pretty
hacky. A clean port would extract the algorithms from hq?x.c and fit
it into the PNM libraries rather than hack a wrapper around Maxim's
Image.cpp code.

Maxim notes that it's odd to use his algorithms in a non-realtime
context. hq?x sacrifices quality to make sure it can run really
quickly for emulators. Presumably a batchmode tool like pnmhqxscale
could operate more slowly and produce higher quality images. However.
I'm not aware of any algorithms that actually do this. Most of the
fancy scaling algorithms are great for photos but not good for spirte
art. -- Nelson

  
See also:

Scale2x
  http://scale2x.sourceforge.net/
Scaling up sprite art
  http://www.nelson.monkey.org/~nelson/weblog/tech/spriteScaling.html


Maxim's code is distributed under the LGPL - see license.txt for
details. Nelson's patches and code are given to the public domain and
can be distributed under any license you see fit. Note that Nelson's
portion is tiny.
