hqx 0.1.1

high-quality pixel-art image magnification (2x/3x/4x upscaling)
Documentation
# hqx

High-quality pixel-art magnification by 2x, 3x, and 4x. The filter keeps sharp
edges sharp and smooths diagonal edges, which suits sprites and tiles far better
than bilinear scaling.

## How it works

For each source pixel the filter reads a 3x3 neighborhood, classifies the eight
neighbors as close or distant in an approximate YUV space, and fills the output
block from a 256-entry rule table. Border pixels replicate their nearest
in-image neighbor.

## Pixel format

Each pixel is a `u32` read as `0xAARRGGBB`. Alpha sits in the top byte and rides
through interpolation. Color comparison ignores alpha. Byte order in memory is
the caller's concern.

## Usage

```rust
// A 2x2 image of four colors, scaled 2x to 4x4.
let src = [
    0x00FF_0000, 0x0000_FF00,
    0x0000_00FF, 0x00FF_FFFF,
];
let mut dst = vec![0u32; 2 * 2 * src.len()];
hqx::hq2x(&src, &mut dst, 2, 2);
assert_eq!(dst.len(), 16);
```

The destination must hold `scale * scale * width * height` pixels. A short
destination panics up front before any write. The `_rb` variants take explicit
row strides in pixels for padded buffers.

## Installation

```toml
[dependencies]
hqx = "0.1"
```

## License

Distributed under the GNU Lesser General Public License version 2.1 or later.
See [LICENSE](LICENSE) and [NOTICE](NOTICE).