Hqx: Difference between revisions
gif->png |
No edit summary |
||
Line 9: | Line 9: | ||
==External links== |
==External links== |
||
*[http://web.archive.org/web/20070703061942/www.hiend3d.com/hq2x.html hq2x], [http://web.archive.org/web/20070703061942/www.hiend3d.com/hq3x.html hq3x] and [http://web.archive.org/web/20070703061942/www.hiend3d.com/hq4x.html hq4x] at HiEnd3D.com (archived copy) |
*[http://web.archive.org/web/20070703061942/www.hiend3d.com/hq2x.html hq2x], [http://web.archive.org/web/20070703061942/www.hiend3d.com/hq3x.html hq3x] and [http://web.archive.org/web/20070703061942/www.hiend3d.com/hq4x.html hq4x] at HiEnd3D.com (archived copy) |
||
* [http://code.google.com/p/hqx/ hqx project] at code.google.com |
|||
*[http://scale2x.sf.net/ scale2x], an alternate implementation |
*[http://scale2x.sf.net/ scale2x], an alternate implementation |
||
Revision as of 01:05, 1 April 2010
In image processing, hqx ("hq" stands for "high quality" and "x" stands for magnification) is one of the pixel art scaling algorithms developed by Maxim Stepin, used in emulators such as Nestopia, bsnes, ZSNES, Snes9x, FCE Ultra and many more. There are 3 hqx filters: hq2x, hq3x and hq4x which magnify by factor of 2, 3 and 4 respectively. For other magnification factors, this filter is used with nearest-neighbor scaling.
Algorithm
First, the color of each of the 8 pixels around the source pixel is compared to the color of the source pixel. Shapes are detected by checking for pixels of similar color, according to some threshold. This gives total of 28 = 256 combinations of similar or dissimilar neighbors. To expand the single pixel into a 2x2, 3x3 or 4x4 block of pixels, the arrangement of neighbors is looked up in a predefined table that contains the necessary algorithms.
External links
- hq2x, hq3x and hq4x at HiEnd3D.com (archived copy)
- hqx project at code.google.com
- scale2x, an alternate implementation