🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@cwasm/jpeg-turbo

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cwasm/jpeg-turbo

JPEG decoding for Node.js, using [libjpeg-turbo][libjpeg-turbo] compiled to [WebAssembly][WebAssembly].

0.1.0
Source
npm
Version published
Weekly downloads
3.5K
-11.84%
Maintainers
1
Weekly downloads
 
Created
Source

JPEG

JPEG decoding for Node.js, using libjpeg-turbo compiled to WebAssembly.

Installation

npm install --save @cwasm/webp

Usage

const fs = require('fs')
const webp = require('@cwasm/webp')

const source = fs.readFileSync('image.webp')
const image = webp.decode(source)

console.log(image)
// { width: 128,
//   height: 128,
//   data:
//    Uint8ClampedArray [ ... ] }

API

decode(source: Uint8Array): ImageData

Decodes raw JPEG data into an ImageData object.

FAQs

Package last updated on 03 Apr 2019

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