REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.26 KB
Close
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/png-js/README.md
Text
Base64
png.js ====== A PNG decoder in JS for the canvas element or Node.js. ## 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. <canvas></canvas> <script src="zlib.js"></script> <script src="png.js"></script> <script> var canvas = document.getElementsByTagName('canvas')[0]; PNG.load('some.png', canvas); </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 var PNG = require('png-js'); PNG.decode('some.png', function(pixels) { // pixels is a 1d array (in rgba order) of decoded pixel data }); You can also call `PNG.load` if you want to load the PNG (but not decode the pixels) synchronously. If you already have the PNG data in a buffer, simply use `new PNG(buffer)`. In both of these cases, you need to call `png.decode` yourself which passes your callback the decoded pixels as a buffer. If you already have a buffer you want the pixels copied to, call `copyToImageData` with your buffer and the decoded pixels as returned from `decodePixels`.
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
examples
DIR
-
drwxr-xr-x
2026-02-14 19:19:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
images
DIR
-
drwxr-xr-x
2026-02-14 19:20:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
test
DIR
-
drwxr-xr-x
2026-02-14 19:21:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.prettierrc
29 B
lrw-r--r--
2026-02-14 19:19:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.html
1.24 KB
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.04 KB
lrw-r--r--
2026-02-14 19:19:12
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
850 B
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
png-node.js
11.91 KB
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
png.js
17.03 KB
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
1.26 KB
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
zlib.js
16.73 KB
lrw-r--r--
2026-02-14 19:19:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).