Gathering detailed insights and metrics for heic-decode
Gathering detailed insights and metrics for heic-decode
Gathering detailed insights and metrics for heic-decode
Gathering detailed insights and metrics for heic-decode
@types/heic-decode
TypeScript definitions for heic-decode
@qs-coder/heic-decode
Decode HEIC images to raw data
heic-decode-esm
Decode HEIC images to raw data
heictojpeg
Converting HEIC/HEIF image formats to JPEG in the browser Decode from [@saschazar/wasm-heif](https://github.com/saschazar21/webassembly/tree/main/packages/heif)
npm install heic-decode
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.2
Supply Chain
91
Quality
81.8
Maintenance
100
Vulnerability
98.9
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
47 Stars
68 Commits
16 Forks
3 Watchers
1 Branches
2 Contributors
Updated on Jul 04, 2025
Latest Version
2.1.0
Package Id
heic-decode@2.1.0
Unpacked Size
6.50 kB
Size
2.60 kB
File Count
4
NPM Version
8.19.4
Node Version
16.20.2
Published on
Jul 04, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Decode HEIC images to extract raw pixel data.
1npm install heic-decode
Decode the main image in the file:
1const fs = require('fs'); 2const { promisify } = require('util'); 3const decode = require('heic-decode'); 4 5(async () => { 6 const buffer = await promisify(fs.readFile)('/path/to/my/image.heic'); 7 const { 8 width, // integer width of the image 9 height, // integer height of the image 10 data // Uint8ClampedArray containing pixel data 11 } = await decode({ buffer }); 12})();
Decode all images in the file:
1const fs = require('fs'); 2const { promisify } = require('util'); 3const decode = require('heic-decode'); 4 5(async () => { 6 const buffer = await promisify(fs.readFile)('/path/to/my/multi-image.heic'); 7 const images = await decode.all({ buffer }); 8 9 for (let image of images) { 10 // decode and use each image individually 11 // so you don't run out of memory 12 const { 13 width, // integer width of the image 14 height, // integer height of the image 15 data // Uint8ClampedArray containing pixel data 16 } = await image.decode(); 17 } 18 19 // when you are done, make sure to free all memory used to convert the images 20 images.dispose(); 21})();
Note: when decoding a single image (i.e. using
decode
), all resources are freed automatically after the conversion. However, when decoding all images in a file (i.e. usingdecode.all
), you can decode the images at any time, so there is no safe time for the library to free resources -- you need to make sure to calldispose
once you are done.
When the images are decoded, the return value is a plain object in the format of ImageData
. You can use this object to integrate with other imaging libraries for processing.
Note that while the decoder returns a Promise, it does the majority of the work synchronously, so you should consider using a worker thread in order to not block the main thread in highly concurrent production environments.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
9 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 8
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More