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

@react-pdf/png-js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf/png-js - npm Package Compare versions

Comparing version 1.0.0 to 2.0.1

lib/png-js.browser.cjs.js

40

package.json
{
"name": "@react-pdf/png-js",
"description": "A PNG decoder in CoffeeScript",
"version": "1.0.0",
"main": "dist/png-js.cjs.js",
"module": "dist/png-js.es.js",
"description": "A PNG decoder in JS",
"version": "2.0.1",
"main": "lib/png-js.cjs.js",
"module": "lib/png-js.es.js",
"browser": {
"./dist/png-js.es.js": "./dist/png-js.browser.es.js",
"./dist/png-js.cjs.js": "./dist/png-js.browser.cjs.js"
"./lib/png-js.es.js": "./lib/png-js.browser.es.js",
"./lib/png-js.cjs.js": "./lib/png-js.browser.cjs.js"
},

@@ -16,30 +16,12 @@ "author": {

},
"dependencies": {
"@react-pdf/zlib": "^2.0.0"
},
"scripts": {
"build": "rollup -c",
"prepublish": "npm run build",
"test:size": "bundlesize"
"watch": "rollup -c -w"
},
"devDependencies": {
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"bundlesize": "^0.17.0",
"rollup": "^0.52.2",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-ignore": "^1.0.3",
"rollup-plugin-replace": "^1.1.1",
"rollup-plugin-uglify": "^3.0.0"
},
"files": [
"dist"
],
"bundlesize": [
{
"path": "./dist/png-js.cjs.min.js",
"maxSize": "2kB"
},
{
"path": "./dist/png-js.browser.cjs.min.js",
"maxSize": "2kB"
}
"lib"
]
}

@@ -1,6 +0,21 @@

png.js
======
<p align="center">
<img src="https://user-images.githubusercontent.com/5600341/27505816-c8bc37aa-587f-11e7-9a86-08a2d081a8b9.png" height="280px">
</p>
# @react-pdf/png-js
A PNG decoder in JS for the canvas element or Node.js.
## Acknowledges
This project is a fork of [png.js](https://github.com/foliojs/png.js) by @devongovett and continued under the scope of this project since it has react-pdf specific features. Any recongnition should go to him and the original project mantainers.
## About this fork
> Updated to 977b857a11676c1e720e79ed8d9178a005a9abd6
- Build node and browser specific bundles
- Uses rollup for build
## Browser Usage
Simply include png.js and zlib.js on your HTML page, create a canvas element, and call PNG.load to load an image.

@@ -15,10 +30,11 @@

</script>
The source code for the browser version resides in `png.js` and also supports loading and displaying animated PNGs.
## Node.js Usage
Install the module using npm
sudo npm install png-js
Require the module and decode a PNG

@@ -30,3 +46,3 @@

});
You can also call `PNG.load` if you want to load the PNG (but not decode the pixels) synchronously. If you already

@@ -33,0 +49,0 @@ have the PNG data in a buffer, simply use `new PNG(buffer)`. In both of these cases, you need to call `png.decode`

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