Closed Diegovsky closed 2 years ago
If conversions between types defined in this crate are missing (like ARGB<>RGBA), then yes — please make a PR for them.
I'm less sure about other types. There are already some functions for converting from slices, which could work with arrays too.
Yes, there are a bunch of ways to convert them and that's great! I proposed theses changes mainly because of something I stumbled upon while using it.
For example, I'm working with a global ARGB format for all my buffers and painting the final result into a BGRA buffer. To solve this, I had to manually write the byte swapping. That's not ideal but it was just 4 lines so it's fine. Since it's a simple I conversion I thought about proposing it.
I'll take a look and then come up with a PR soon :)
What do you think about
alt
types implementingFrom
for [T; 4] and other types, likeFrom<RGBA>
forARGB
? Loving the crate btw :)