Open Yuki-Zhao opened 5 years ago
It seems that it is caused by the wrong number of pixels obtained here. The size here is the actual size displayed by the picture rather than the original size. Therefore, the extracted color will change according to the width of the image container.
Should it be changed to this? @lokesh
const pixelCount = image.naturalWidth * image.naturalHeight;
the first picture was from the website.( https://www.lokeshdhakar.com/projects/color-thief/)
the second picture, i download the dist from github.
i compared two pictures, the result is different. why ?