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

image-decode-audit-fixed

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-decode-audit-fixed

Decode image data from gif, jpeg, png, tiff or bmp

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
72
increased by20%
Maintainers
1
Weekly downloads
 
Created
Source

image-decode unstable Build Status

Decode image data from raw encoded binary data in any image format: PNG, GIF, BMP, JPEG, TIFF.

Usage

npm install image-decode

let decode = require('image-decode')

let {data, width, height} = decode(fs.readFileSync('./data.png'))

API

let {data, width, height} = decode(buffer, mimeType?)

Takes input buffer with encoded image data and decodes its contents, returns pixels data array with layout [r, g, b, a, r, g, b, a, ...]. mimeType can be passed to skip image type detection.

buffer can be any binary data container:

  • ArrayBuffer
  • Buffer
  • Uint8Array
  • base64 string

See also

Credits

© 2018 Dmitry Yv. MIT License.

Keywords

FAQs

Package last updated on 25 Nov 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