
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Pure JavaScript implemented png decoder (as well as encoder) that supports modern browsers as well as Node.JS
View this demo
Supported PNG features:
In Browser:
<canvas></canvas>
<script src="src/zlib/zlib.js"></script>
<!-- load inflate.js only if you don't want inflate run in Worker -->
<script src="src/zlib/inflate.js"></script>
<script src="src/png.js"></script>
<script>
PNG.load(image_url).then(function (png) {
png.renderTo(document.querySelector('canvas'))
})
</script>
In Node.JS:
var fs = require('fs')
require('yapd').load('rgba.png')
PNG encoder is added. See encoder
Returns a promise of type PNGImage.
In web browsers, a fetch or XHR request is sent to get the content. In Node.JS, a local file is read.
PNG.load('rgba.png').then(function (png) {
// png instanceof PNGImage
})
Decodes the png image file content.
var buf = ...
png.decode(buf).then(function (png) {
// png instanceof PNGImage
})
A png image decoded from buffer, contains several properties and methods:
grayscale rgb rgba platte and grayscale_alphaFAQs
Pure JavaScript PNG decoder/encoder
We found that yapd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.