use the original dims for the color extractor

This commit is contained in:
Mylloon 2024-12-15 23:13:08 +01:00
parent 7b8dafc852
commit b1d8500611
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -30,10 +30,12 @@ const svgChangeTheme = (mode) => {
*/
const extractColors = (image) => {
const canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
canvas.width = image.naturalWidth;
canvas.height = image.naturalHeight;
const ctx = canvas.getContext("2d");
ctx.drawImage(image, 0, 0);
console.log(image);
const imageData = ctx.getImageData(
0,
0,