pixel8bit 1.0.2

A Rust library for applying 8-bit pixelation effects with symmetry detection and mirroring.
Documentation
  • Coverage
  • 50%
    3 out of 6 items documented0 out of 3 items with examples
  • Size
  • Source code size: 66.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.68 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 36s Average build duration of successful builds.
  • all releases: 34s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • PeriniM/pixel8bit
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • PeriniM

👾 pixel8bit

Crates.io License: MIT Build Status Crates.io Downloads

pixel8bit is a Rust library and command-line tool that applies 8-bit pixelation effects to images, with optional symmetry detection and mirroring.

✨ Features

  • 8-bit Pixelation: Transform images to emulate classic 8-bit graphics.
  • Symmetry Detection: Automatically detect horizontal and vertical symmetry axes.
  • Mirroring: Mirror images around detected symmetry axes for artistic effects.

📦 Installation

To install pixel8bit, ensure you have Rust and Cargo installed. Then, run:

cargo install pixel8bit

🚀 Usage

After installation, you can use the pixel8bit command-line tool as follows:

pixel8bit <input_path> <output_path> <block_size> <is_mirrored>
  • <input_path>: Path to the input image file.
  • <output_path>: Path to save the processed image.
  • <block_size>: Size of the pixel blocks (e.g., 16).
  • <is_mirrored>: true or false to enable or disable mirroring.

Example:

To pixelate an image with a block size of 16 pixels and enable mirroring:

pixel8bit input.jpg output.jpg 16 true

🛠️ Library Integration

To use pixel8bit as a library in your Rust project, add the following to your Cargo.toml:

[dependencies] pixel8bit = "0.1.0"

Then, in your code:

use pixel8bit::pixelate::apply_pixelation;
use pixel8bit::symmetry::{detect_symmetry, mirror_image};

🖼️ Pixelation Examples

Block Size Result
Original Original Image
8x8 Pixelated Image (8x8)
16x16 Pixelated Image (16x16)
32x32 Pixelated Image (32x32)
64x64 Pixelated Image (64x64)

🤝 Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

📄 License

This project is licensed under the MIT License.