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

@myunisoft/heif-converter

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@myunisoft/heif-converter - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

7

package.json
{
"name": "@myunisoft/heif-converter",
"description": "Bindings for the libheif C API to convert an image in Node.js",
"version": "0.0.4",
"version": "0.0.5",
"keywords": [

@@ -50,5 +50,6 @@ "heif",

"optionalDependencies": {
"@myunisoft/heif-converter.linux-x64": "^0.0.3",
"@myunisoft/heif-converter.win32-x64": "^0.0.3"
"@myunisoft/heif-converter.linux-x64": "^0.0.4",
"@myunisoft/heif-converter.linuxmusl-x64": "^0.0.4",
"@myunisoft/heif-converter.win32-x64": "^0.0.4"
}
}

@@ -14,7 +14,6 @@ <p align="center">

For more information about the libraries used in this project, you can visit the following links:
For more information about the librarie used in this project, you can visit the following links:
* [libheif](https://github.com/strukturag/libheif/tree/master)
* [libjpeg](https://github.com/winlibs/libjpeg)
* [libpng](https://github.com/pnggroup/libpng)
* [aom](https://github.com/mozilla/aom)

@@ -44,3 +43,3 @@ ## ❤️ Motivations

## 🚀 API
### toJpeg
- ### toJpeg

@@ -67,3 +66,3 @@ The **toJpeg** method converts the primary image of a HEIC file to **jpg**.

### toPng
- ### toPng

@@ -81,3 +80,3 @@ The **toPng** method converts the primary image of a HEIC file to **png**.

### extract
- ### extract

@@ -123,34 +122,37 @@ The **extract** method allows you to obtain a list of images contained in a HEIC file. Each extracted image has two methods, **toJpeg** and **toPng**, which allow you to convert the image to JPEG or PNG format, respectively, as documented above.

#### HEIC file containing an image of 3992*2992.
| Module | Convert | ops/sec | Average Time (ms) |
|----------------|:------------:|:-------:|:-----------------:|
| heic-convert | JPEG | 0.45 | 2218 |
| heif-converter | JPEG | 3.21 | 312 |
```
┌─────────┬──────────────────────────┬─────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼──────────────────────────┼─────────┼────────────────────┼──────────┼─────────┤
│ 0 │ 'JPG ==> heif-converter' │ '5' │ 168399799.99999997 │ '±1.24%' │ 10 │
│ 1 │ 'JPG ==> heic-convert' │ '0' │ 1094995630.0000002 │ '±0.63%' │ 10 │
│ 2 │ 'PNG ==> heif-converter' │ '1' │ 715495539.9999995 │ '±0.18%' │ 10 │
│ 3 │ 'PNG ==> heic-convert' │ '0' │ 1691614560.0000005 │ '±0.47%' │ 10 │
└─────────┴──────────────────────────┴─────────┴────────────────────┴──────────┴─────────┘
```
| Module | Convert | ops/sec | Average Time (ms) |
|----------------|:------------:|:-------:|:-----------------:|
| heic-convert | PNG | 0.28 | 3460 |
| heif-converter | PNG | 0.78 | 1274 |
#### HEIC file containing an image of 2400*1600.
| Module | Convert | ops/sec | Average Time (ms) |
|----------------|:------------:|:-------:|:-----------------:|
| heic-convert | JPEG | 1.79 | 220 |
| heif-converter | JPEG | 4.55 | 559 |
```
┌─────────┬──────────────────────────┬─────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼──────────────────────────┼─────────┼────────────────────┼──────────┼─────────┤
│ 0 │ 'JPG ==> heif-converter' │ '9' │ 107019470.00000027 │ '±0.67%' │ 10 │
│ 1 │ 'JPG ==> heic-convert' │ '3' │ 287341830.0000001 │ '±1.53%' │ 10 │
│ 2 │ 'PNG ==> heif-converter' │ '5' │ 188958699.9999996 │ '±1.03%' │ 10 │
│ 3 │ 'PNG ==> heic-convert' │ '2' │ 407586150.0000004 │ '±0.96%' │ 10 │
└─────────┴──────────────────────────┴─────────┴────────────────────┴──────────┴─────────┘
```
| Module | Convert | ops/sec | Average Time (ms) |
|----------------|:------------:|:-------:|:-----------------:|
| heic-convert | PNG | 1.16 | 366 |
| heif-converter | PNG | 2.73 | 863 |
#### HEIC file containing an image of 640*426.
| Module | Convert | ops/sec | Average Time (ms) |
|----------------|:------------:|:-------:|:-----------------:|
| heic-convert | JPEG | 16.79 | 559 |
| heif-converter | JPEG | 56.07 | 220 |
| Module | Convert | ops/sec | Average Time (ms) |
|----------------|:------------:|:-------:|:-----------------:|
| heic-convert | PNG | 13.60 | 863 |
| heif-converter | PNG | 33.85 | 366 |
```
┌─────────┬──────────────────────────┬─────────┬────────────────────┬───────────┬─────────┐
│ (index) │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼──────────────────────────┼─────────┼────────────────────┼───────────┼─────────┤
│ 0 │ 'JPG ==> heif-converter' │ '108' │ 9191369.090909092 │ '±0.88%' │ 55 │
│ 1 │ 'JPG ==> heic-convert' │ '31' │ 31666893.749999985 │ '±10.25%' │ 16 │
│ 2 │ 'PNG ==> heif-converter' │ '66' │ 15030594.117647083 │ '±1.22%' │ 34 │
│ 3 │ 'PNG ==> heic-convert' │ '31' │ 31297225.000000026 │ '±2.71%' │ 16 │
└─────────┴──────────────────────────┴─────────┴────────────────────┴───────────┴─────────┘
```
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