(decode blurhash w h & [punch linear])
The function takes a blurhash, along with some parameters, and returns an image as a pixel matrix. Along with the blurhash string, you need to provide width and height (w, h) values of the image you want to decode.
The optional punch
tunes the contrast of the image.
If you want the image to be decoded into a matrix of linear floating-point
values, set the linear
parameter to true
.
In Clojure, this function returns a picture represented as nested vectors. In ClojureScipt, it is returned as an Uint8ClampedArray that can be rendered into HTML canvas.
The function takes a blurhash, along with some parameters, and returns an image as a pixel matrix. Along with the blurhash string, you need to provide width and height (w, h) values of the image you want to decode. The optional `punch` tunes the contrast of the image. If you want the image to be decoded into a matrix of linear floating-point values, set the `linear` parameter to `true`. In Clojure, this function returns a picture represented as nested vectors. In ClojureScipt, it is returned as an Uint8ClampedArray that can be rendered into HTML canvas.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close