@react-pdf/png-js
Advanced tools
Comparing version 1.0.0 to 2.0.1
{ | ||
"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` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
50
65613
1
1394
1
+ Added@react-pdf/zlib@^2.0.0
+ Added@react-pdf/zlib@2.0.0(transitive)
+ Addedpako@2.1.0(transitive)