hqx
brew install hqx
v1.2
LGPL-2.1-or-later
Magnification filter designed for pixel art
3
30-day installs · #11939
17
90-day · #10143
100
365-day · #9183
97
★ GitHub stars · updated 3y ago
Runtime dependencies
Build dependencies
Links
- https://github.com/grom358/hqx
- GitHub: grom358/hqx
- Brew formula source: Formula/h/hqx.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"autoconf",
"automake",
"libtool",
"pkgconf"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [
"devil"
],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Magnification filter designed for pixel art",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:38:40+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "hqx",
"github_default_branch": "master",
"github_last_commit_at": "2023-06-03T02:07:07Z",
"github_readme_excerpt": "hqx Library README\n==================\n\n# Introduction\nhqx (\"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.\n\n# Build\n\n autoreconf -vi\n\n# Install\nNOTE: [DevIL](http://openil.sf.net/) library and development headers are required.\n\n ./configure\n make \u0026\u0026 make install\n\nFor more information refer to INSTALL.\n\n# Usage\nhqx -s scaleBy input output\nWhere scaleBy is either 2, 3 or 4\n\nFor example:\n```\nhqx -s 4 test.png out.png\n```\n\n# Example\n```c\n#include \u003cstdint.h\u003e\n#include \u003chqx.h\u003e\n\nuint32_t *src; // Pointer to source bitmap in RGB format\nsize_t width, height; // Size of source bitmap\n\n/*\n * Code to init src, width \u0026 height\n */\n\nuint32_t *dest = (uint32_t *) malloc(width * 4 * height * 4 * sizeof(uint32_t));\nhqxInit();\nhq4x_32(src, dest, width, height);\n```\n\n# Implementation\nThe first step is an analysis of the 3x3 area of the source pixel. At first, we\ncalculate the color difference between the central pixel and its 8 nearest\nneighbors. Then that difference is compared to a predefined threshold, and these\npixels are sorted into two categories: \"close\" and \"distant\" colored. There are\n8 neighbors, so we are getting 256 possible combinations.\n\nFor the next step, which is filtering, a lookup table with 256 entries is used,\none entry per each combination of close/distant colored neighbors. Each entry\ndescribes how to mix the colors of the source pixels from 3x3 area to get\ninterpolated pixels of the filtered image.\n\nThe present implementation is using YUV color space to calculate color\ndifferences, with more tolerance on Y (brightness) component, then on color\ncomponents U and V. That color space conversion is quite easy to implement if\nthe format of the source image is 16 bit per pixel, using a simple lookup ",
"github_repo": "grom358/hqx",
"github_stars": 97,
"github_topics": [],
"homepage": "https://github.com/grom358/hqx",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 3,
"installs_365d": 100,
"installs_90d": 17,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "LGPL-2.1-or-later",
"llm_generated_at": null,
"llm_model": null,
"name": "hqx",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 11939,
"rank_365d": 9183,
"rank_90d": 10143,
"raw_hash": "c8b9f19578deddcc",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/h/hqx.rb",
"tap": "homebrew/core",
"test_dependencies": [
"php"
],
"uses_from_macos": [],
"version_head": null,
"version_stable": "1.2",
"versioned_formulae": [],
"why_use_this": null
}