npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

heic-net

v0.1.9

Published

An independent MIT-licensed HEIC decoder for browsers. .NET compiled to WebAssembly, with no libheif or libde265.

Readme

heic-net

An independent MIT-licensed HEIC decoder for browsers. The decoder is written in C# and compiled ahead of time to WebAssembly. It does not use libheif, libde265, or an LGPL-licensed HEVC decoder.

Install

npm install heic-net
npx heic-net-assets public/heic

Run the asset-copy command before your application's development and production builds. It copies prebuilt files; consumers do not need the .NET SDK.

import { HeicDecoder } from "heic-net";

const decoder = new HeicDecoder({ assetsUrl: "/heic/" });
const image = await decoder.decode(file);

const canvas = document.createElement("canvas");
canvas.width = image.width;
canvas.height = image.height;
const context = canvas.getContext("2d");
if (!context) {
  throw new Error("A 2D canvas is unavailable.");
}
context.putImageData(new ImageData(image.pixels, image.width, image.height), 0, 0);

// When the decoder is no longer needed:
decoder.dispose();

Use your deployment's base path in assetsUrl. Serve the copied files from the same origin, with application/wasm for .wasm files and JavaScript MIME types for .js files. Keep the entire copied directory together.

API

new HeicDecoder({ assetsUrl, maxPixels? }) creates a decoder without loading WebAssembly. The first decode starts one module Web Worker and loads the runtime. Later calls reuse that worker. Decoding runs outside the browser's main thread; concurrent requests are processed by the same decoder worker.

decode(input) accepts a Blob, ArrayBuffer, or Uint8Array and returns Promise<HeicImage>: width, height, and caller-owned RGBA8 pixels (Uint8ClampedArray). Input buffers remain usable after decoding. Returned pixels remain valid after later decodes or disposal. HEIC errors reject the individual request; a worker failure rejects all pending calls.

dispose() terminates the worker and rejects pending and future calls.

Support and color

The package uses the same decoder as Heic.NET. It supports HEIF grids, primary images, transformations and auxiliary alpha, with 8/10-bit monochrome, 4:2:0, 4:2:2 and 4:4:4 HEVC intra images. See the current support boundary.

RGBA values retain the source primaries and transfer function. ICC conversion and HDR tone mapping are not performed; displaying those bytes in an sRGB canvas can change their appearance. AVIF decoding and Node.js are not supported by this browser API.

License

The decoder and JavaScript API are MIT licensed. The package also includes the .NET WebAssembly runtime and its license and third-party notices under runtime/Licenses/dotnet.