#image #bit #bitmap #pixel #convert-binary

binary_image

A library for handling binary images

12 releases (6 breaking)

1.0.4 Dec 8, 2024
0.7.1 Jan 25, 2025
0.6.1 Dec 27, 2024
0.1.0 Nov 28, 2024

#379 in Images

Download history 106/week @ 2024-11-27 603/week @ 2024-12-04 440/week @ 2024-12-11 1/week @ 2024-12-18 260/week @ 2024-12-25 57/week @ 2025-01-01 31/week @ 2025-01-08 188/week @ 2025-01-22 33/week @ 2025-01-29 28/week @ 2025-02-05 13/week @ 2025-02-12 4/week @ 2025-02-19 34/week @ 2025-02-26

85 downloads per month
Used in 2 crates (via edges)

MIT/Apache

28KB
656 lines

binary_image

A Rust library for handling binary images (black and white). This library provides efficient structures and operations for manipulating binary pixel data, making it suitable for image processing tasks.

Features

  • Efficient Storage: Compact representation of binary pixel data for minimal memory usage.
  • Pixel Manipulation: Support for basic pixel operations such as setting, getting, and modifying pixel values.
  • Arithmetic Operations: Perform logical operations on binary images, such as AND, OR, and XOR.
  • Image Creation: Easily create binary images from raw data or other formats.
  • View Support: Access pixel data through safe views, preventing out-of-bounds errors.
  • Conversion: Convert binary images to and from other pixel formats (e.g., RGB, RGBA).
  • Iterators: Provide iterators for easy traversal of pixel data.

Installation

Add the following to your Cargo.toml:

[dependencies]
# replace "*" with the most recent version of binary_image
binary_image = "*"

License

  • MIT License
  • Apache License 2.0

Dependencies

~2–36MB
~559K SLoC