Closed catbao closed 2 years ago
Hi there, thanks for contributing!
Can you provide some more details? What error are you getting? What have you tried? It will help us debug this more easily
Thank you for your patience. My problem maybe like: If I run the code in the RunKit+npm like follows, it wil be wrong like this. I think the problem is the version, but I do not know what's the correct version to make it work. .
Apologies for the delayed response. I suspect animated gifs won't work but I also haven't tried runkit. I see now that the demo link on the README is broken, this is the link to view the code and this one is for the rendered app.
Note that you need to import ssim as:
const { ssim } = require("ssim.js");
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
import ssim from "ssim.js";
const img1 = loadImage("./img1.jpg"); const img2 = loadImage("./img2.jpg");
const { mssim, performance } = ssim(img1, img2);
console.log(
SSIM: ${mssim} (${performance}ms)
);The version id not correct! I want know how to do it.