srcery-colors / srcery-convert

WIP Convert images to srcery palette
MIT License
5 stars 0 forks source link

Distance function bias seems off, picks wrong colors sometimes #1

Open roosta opened 3 years ago

roosta commented 3 years ago

I use a bias when calculating distance between colors, seems a bit wrong, the program tends to favor the wrong color sometimes

RustemB commented 3 years ago

original image

srcery-ized image

:D

Takes ~0.03s to convert

roosta commented 3 years ago

neat, that was quick too. I tried some 4k images and that took a good while. Colors don't seem that off either. Calling that a success ;)

RustemB commented 3 years ago

have you run with --release?

[rustemb@machine srcery-convert]$ time cargo run  -- ~/Pictures/Saturn.png Saturn.png
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/srcery-convert /home/rustemb/Pictures/Saturn.png Saturn.png`

real    0m16.007s
user    0m15.846s
sys 0m0.034s
[rustemb@machine srcery-convert]$ time cargo run --release  -- ~/Pictures/Saturn.png Saturn.png
    Finished release [optimized] target(s) in 0.09s
     Running `target/release/srcery-convert /home/rustemb/Pictures/Saturn.png Saturn.png`

real    0m0.732s
user    0m0.648s
sys 0m0.029s
roosta commented 3 years ago

No never actually tried that :D, that quite a bit of improvement I must say