Dither images using wasm plugin
This commit is contained in:
parent
179d0653bb
commit
92ec72ab4b
14 changed files with 116 additions and 15 deletions
|
|
@ -20,4 +20,14 @@
|
|||
// the same size after tearing off the paper.
|
||||
#let feed = v(64pt + 32pt)
|
||||
|
||||
#import plugin("plugin.wasm") as plugin
|
||||
////////////
|
||||
// Plugin //
|
||||
////////////
|
||||
|
||||
#import plugin("plugin.wasm") as p
|
||||
|
||||
#let dither(path) = {
|
||||
let bytes = read(path, encoding: none)
|
||||
let dithered = p.dither(bytes)
|
||||
image(dithered)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue