embedded-graphics / embedded-graphics/tinyqoi
Improve memory overhead in PixelsIter
- Dominant language
- Rust
- Stars
- 7
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
`PixelsIter` stores the previous color values as an array of `Rgb888`, which uses 4 bytes per pixel. The memory overhead could be reduced by using an `u8` array instead.
Using an byte array, where the elements are not aligned to 4 byte boundaries, could cause performance degradation so it might be useful to add a cargo feature to choose between better performance or lower memory consumption.
And the alpha values shouldn't be stored if the image isn't RGBA and a byte array is used. For an array of `u32` pixel values (like `Rgb888` uses) there would be no additional overhead in storing the alpha values, because the high byte is currently unused.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.