#png #demoscene #compression #pnginator

app wasmpng

Combines a Javascript and WASM file into a single executable polygot PNG+HTML file

4 releases

0.1.3 Nov 24, 2022
0.1.2 Aug 25, 2022
0.1.1 Feb 8, 2022
0.1.0 Sep 23, 2021

#688 in WebAssembly

MIT license

7KB
79 lines

WASM-PNG

Combines a Javascript and WASM file into a single executable polygot PNG+HTML file.

Usage:

  • cargo install wasmpng
  • wasmpng --wasm-file my.wasm --js-file my.js
  • This will generate index.png.html which will automatically unpack and execute, loading itself as a PNG and extracting the data from there

NOTE: By default file access is blocked in Chrome, so you can't test this locally unless you spin up an HTTP server. Start Chrome with the --allow-file-access-from-file to remove this restriction.

The Javascript will receive the WASM as a regular array in arguments[0]. See the examples folder for an example.

You can also pass --max-width to restrict the width of the generated PNG.

Inspiration and parts of the loader code come from pnginator by Gasman et al.

Dependencies

~3.5MB
~41K SLoC

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy