kornelski / imgref

A trivial Rust struct for interchange of pixel buffers with width, height & stride
https://lib.rs/crates/imgref
Apache License 2.0
59 stars 6 forks source link

Generic size types #24

Open tversteeg opened 3 weeks ago

tversteeg commented 3 weeks ago

Would you be willing to accept a PR where I make each numeric type generic? Some crates use u32 for sizes, some usize and some even u16.

Of course the default would still be usize.

kornelski commented 3 weeks ago

Yes. Please see https://github.com/kornelski/imgref/tree/v2-preview

tversteeg commented 3 weeks ago

Oh great! Do you need any help with this new version?

kornelski commented 3 weeks ago

Yes, help is welcome.

That code is unfinished and buggy. I wish more of it could be implemented using safe code, even as an option, but I haven't figured out how to structure the traits for it.