Skip to content

Narazaka/webp-is-lossless

Repository files navigation

webp-is-lossless

check WebP is lossless or not

Install

npm i webp-is-lossless

Usage

import { webpIsLossless } from "webp-is-lossless";

function showIsLossless(file) {
  const reader = new FileReader();

  reader.readAsArrayBuffer(file);

  reader.onload = function () {
    const isLossless = webpIsLossless(new Uint8Array(reader.result));
    console.log(isLossless);
  };
}

License

Zlib license

About

check WebP is lossless or not

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published