3 ms·
Roundtrip tests are great when you don't have a gold standard. It allows for at least consistency across operations. I've done a bunch and found quite a few cor
by pedrocr 5y ago
Roundtrip tests are great when you don't have a gold standard. It allows for at least consistency across operations. I've done a bunch and found quite a few corner cases. I also did a few roundtrip tests in RGB spaces where being exhaustive was no longer feasible. For those I ended up iterating over the whole RGB space but skipping values in each component by different prime values, to try and cover as many of the possible weird cases as possible:
https://github.com/pedrocr/imagepipe/blob/12269f04ac2fa0d165fc860d853ca828a8b8de3e/src/color_conversions.rs#L337-L610 https://github.com/pedrocr/imagepipe/blob/12269f04ac2fa0d165...