#pixel-perfect #image #drawing #cpu #font #color #outline

h_image

pixel perfect drawing library written in Rust using only CPU

1 unstable release

0.1.0 Jul 25, 2022

#852 in Images

MIT license

32KB
753 lines

(Unnamed Image Library)

Pixel perfect image manipulation library.

It's not meant for real-time applications!

It aims to be pixel-perfect.

For that, it tries not to use floating point values when handling pixels.

It's not GPU-accelerated!

Other crates that it's using under the hood might use GPUs, but it does not.

It uses image crate for image IO. And font-kit for rasterizing fonts.

Features

  • Import/Export
    • Most image formats, thanks to the image crate.
    • SVG format
    • Videos
  • Pixel by pixel manipulation
  • 32bit RGBA Colors
    • Mono
    • Gradient colors.
  • Drawing basic shapes
    • Pixel perfect circles
      • Filled
      • Outline
    • Pixel perfect rectangles
      • Filled
      • Outline
    • Pixel perfect ellipses
      • Filled
      • Outline
    • Pixel perfect triangles
      • Filled
      • Outline
    • Pixel perfect lines
  • Filters
    • It's possible to add filters manually.
    • There's no any built-in filter yet.
  • Transformation
    • Blit
    • Mask
    • Crop
    • Pixel perfect scaling
    • Pixel perfect rotation
  • Fonts
    • Read .otf and .ttf files
    • Background color
    • Underline
    • Outline

Dependencies

~13–23MB
~152K SLoC