vincentsarago / color-operations

Apply basic color-oriented image operations. Fork of rio-color
Other
9 stars 3 forks source link

WIP: Rust port #3

Closed kylebarron closed 4 months ago

kylebarron commented 1 year ago

for https://github.com/vincentsarago/color-operations/issues/2

This compiles but I probably made a mistake in porting the color scale conversion functions and so it's giving incorrect values as output.

image

I can't seem to install the cython version, so I didn't take time to try and track down where the incorrect change was

You can test this with

cd rust
virtualenv env
source ./env/bin/activate
pip install maturin
maturin develop

(you need Rust installed) then

from color_operations import saturate_rgb
kylebarron commented 8 months ago

We added one test for RGB color saturation (from rio-color) and it's working! So it turns out that the code very likely did originally work, but that setting a satmult of 50 was too high and it saturated the colors all the way to 0, 1, 1

kylebarron commented 4 months ago

Closing in favor of #8