Display blurhash
Encode an array of pixel colors as a blurhash
import Color exposing (Color)
import Array exposing (Array)
pixels : Array Color
pixels =
Array.initialize 25 (\i -> Color.rgb255 i i i)
mask : { width : Int, height : Int }
mask =
{ width = 4, height = 4 }
fromPixels mask { rows = 5, columns = 5 } pixels
--> "U01fC^t7WB%MIUWBayWBIUWBfQWB%Mj[ayof"
Convert a blurhash into an image URI. The float parameter is the
punch, used to increase/decrease contrast of the resulting image