Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libheif-web

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libheif-web

An emscripten build of libheif distributed as an npm module for the browser.

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26
decreased by-55.93%
Maintainers
1
Weekly downloads
 
Created
Source

Libheif for Web

An emscripten build of libheif distributed as an npm module for the browser.

Installation

npm i libheif-web

Set libheif url

Download libheif.min.js from the libheif v1.12.0 release and put it in your project's assets folder.

Use following code to set url for libheif.

import {useUrl} from 'libheif-web';

useUrl('assets/scripts/libheif.min.js');

If you skip this step the url will automatically point to libheif.min.js

Using

import {convertHeif, convertAllOfHeif} from 'libheif-web';

const pngImage = await convertHeif(heicFile, 'filename.png', 'image/png');

const images = await convertAllOfHeif(heicFile);
const firstPng = await images[0].convert('filename.png', 'image/png');
const secondPng = await images[1].convert('filename.png', 'image/png');

Keywords

FAQs

Package last updated on 17 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc