mediapy
mediapy copied to clipboard
Setting vmin to a value greater than 0 can produce unexpected results for unsigned integer types
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.