magnify 0.2.0

Simple pixel-art scaling algorithms
Documentation
  • Coverage
  • 0%
    0 out of 8 items documented0 out of 1 items with examples
  • Size
  • Source code size: 50.96 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 451.16 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ahi6/magnify-rs
    3 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ahi6

Magnify-rs

This is a rust library implementing some simple Pixel-art scaling algorithms.

Currently supported algorithms

  • Scale2x, Scale3x
  • Eagle
  • Nearest neighbor scaling

Example

This code scales image.bmp using the Scale3X algorithms and then saves the result into converted.bmp.

use image::ImageReader;
use magnify::Algorithm;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let img = ImageReader::open("image.bmp")?.decode()?;

    let converted_img = magnify::convert(img, Algorithm::Scale3X);
    converted_img.save("converted.bmp")?;

    Ok(())
}