You're probably aware ... and I realize there's a pending rewrite, but I found this for a particular real world blue where often the difference was not detectable, so I pinned it down to a smallish example.
I also realize that you're probably using 1:256 because it's an R index for a palette, but: that means when you give an array of bytes (which write_png accepts!) you get these wrong values out by 1. So, I'm also asking do you want to align numeric array input to byte values for future foist?
You're probably aware ... and I realize there's a pending rewrite, but I found this for a particular real world blue where often the difference was not detectable, so I pinned it down to a smallish example.
I also realize that you're probably using 1:256 because it's an R index for a palette, but: that means when you give an array of bytes (which write_png accepts!) you get these wrong values out by 1. So, I'm also asking do you want to align numeric array input to byte values for future foist?
Created on 2024-01-24 with reprex v2.0.2
Here's foist writing an array of raw Bytes, which I want but don't want to unpack the values to offset them by 1! :)
Created on 2024-01-24 with reprex v2.0.2