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

bin2png

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bin2png

Convert binary data to a png in order to embed it efficiently.

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

bin2png

For more information, please look at the project page.

Usage

To convert a file at the path file.bin to a png that will be created at the path encoded.png:

npx bin2png file.bin encoded.png

Programmatic API

(async) bin2png(data) → {Promise.<Uint8Array>}

Takes binary data in the form of an UInt8Array and returns binary data representing a valid PNG file containing the original data. The data can then be decoded with png2bin.

Parameters
  • data Uint8Array The raw input data to encode.

(async) encode_file(binFileName, pngFileName) → {Promise.<Uint8Array>}

Encodes a file with bin2png and saves the result in another file.

Parameters
  • binFileName string A path to an existing file to encode
  • pngFileName string A path to a file that will be created with the contents

Keywords

FAQs

Package last updated on 02 Mar 2021

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