Since to_rgb simply subtracts vmin from array, low pixels can underflow to high values, producing unexpected results.
I think it should be simple to fix: upcast array to int32 before subtracting vmin, and clamp to zero afterwards. But I haven't thought through edge cases.
Since to_rgb simply subtracts vmin from array, low pixels can underflow to high values, producing unexpected results.
I think it should be simple to fix: upcast array to int32 before subtracting vmin, and clamp to zero afterwards. But I haven't thought through edge cases.