img icon indicating copy to clipboard operation
img copied to clipboard

Image format encoders/decoders with Web API integration and sync/streaming support.

Img

Img is a repo containing implemenetations, made from scratch, of various image formats offering the ability to encode and decode between them, and integrate smoothly with various Web APIs like the Canvas. Where possible, we offer both sync and streaming encoders/decoders.

Missing a format?

If this repo is missing a format you'd like to work with, simply create an issue suggesting the format, along with a link to the standard, specifcation or some document that is essentally the source of truth for that format. Do that and it might get an implementation here.

Formats

Package Latest Version Spec
@img/apng Not Implemented Yet https://wiki.mozilla.org/APNG_Specification
@img/avif Not Implemented Yet https://aomediacodec.github.io/av1-avif/v1.1.0.html
@img/gif Not Implemented Yet https://www.w3.org/Graphics/GIF/spec-gif89a.txt
@img/jpeg Not Implemented Yet https://www.w3.org/Graphics/JPEG/jfif3.pdf
@img/png JSR https://www.w3.org/TR/2003/REC-PNG-20031110/
@img/qoi JSR https://qoiformat.org/qoi-specification.pdf
@img/svg Not Implemented Yet https://www.w3.org/TR/SVG2/
@img/webp Not Implemented Yet https://developers.google.com/speed/webp/docs/riff_container

Try it yourself

Quickly convert images from one of the above formats to another locally in your browser: https://blackaslight.github.io/img/

Coverage

Coverage of Repo