https://github.com/sevinf/magic-kernel-rust
Rust implementation of Magic Kernel resizing algorithms
https://github.com/sevinf/magic-kernel-rust
Last synced: 6 months ago
JSON representation
Rust implementation of Magic Kernel resizing algorithms
- Host: GitHub
- URL: https://github.com/sevinf/magic-kernel-rust
- Owner: SevInf
- License: mit
- Created: 2024-05-19T13:47:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-19T14:13:32.000Z (about 2 years ago)
- Last Synced: 2025-05-14T08:32:40.673Z (about 1 year ago)
- Language: Rust
- Size: 11.2 MB
- Stars: 21
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Magic Kernel for Rust
[](https://crates.io/crates/magic-kernel)
[](https://docs.rs/magic-kernel/latest/magic_kernel/)
Implementation of [Magic Kernel](https://johncostella.com/magic/) family of resizing algorithms.
Usage:
```rust
use magic_kernel::{magic_resize, Version};
magic_resize(
&image,
Version::MagicKernelSharp2021, // algorithm version to use
Some(1500), // width
Some(500), // height
);
```
`image` is expected to be an instance `magic_kernel::ImageF64`. Example of creating `ImageF64` from
[image crate](https://crates.io/crates/image) can be found in [examples directory](https://github.com/SevInf/magic-kernel-rust/tree/main/examples).