image-rs / color_quant

Color quantization library
MIT License
36 stars 16 forks source link

Fix prime which is not prime #14

Closed JulianKnodt closed 3 years ago

JulianKnodt commented 3 years ago

I noticed this while attempting a larger refactor, but thought it worth making its own change. I think this was a typo, because it wasn't prime, but 487 is prime.

JulianKnodt commented 3 years ago

right, so nothing super visible, just visiting the same pixels a few times leading to semi-incorrect results. The original paper also referenced 487 in it, so I assume this was just a typo transferring from the paper

HeroicKatora commented 3 years ago

The original prime seems to be:

public static final int prime3    =   487;

So exactly as corrected :)