#texture #pixel #rgba #image #procedural #proc-macro #array

macro include_rgba

A Rust procedural macro for convenient including of images or textures as RGBA pixel arrays

1 unstable release

0.1.0 Sep 7, 2020

#24 in #rgba

Custom license

6KB

include_rgba

A Rust procedural macro for convenient including of images, textures as RGBA pixel array.

Usage

// The type is [u8; X] where X is the number of pixels * 4
// each element represents a channel value,
// so 4 elements make up a pixel
let rgba_data = include_rgba!("path/to/the/image.png")

Dependencies

~6.5MB
~97K SLoC