module Blurhash

Extended Modules

Defined in:

blurhash.cr
blurhash/srgb.cr
blurhash/version.cr

Constant Summary

VERSION = {{ (`shards version \"/srv/crystaldoc.info/github-Sija-blurhash.cr-v0.1.1/src/blurhash\"`).chomp.stringify }}

Instance Method Summary

Instance Method Detail

def components(str : String) : Tuple(Int32, Int32) | Nil #

Returns components as {x, y} tuple for valid strings, nil otherwise.


[View source]
def encode(x_components : Int, y_components : Int, path : Path) : String #

NOTE At the moment only png and jpg file types are supported.


[View source]
def encode(x_components : Int, y_components : Int, canvas : StumpyCore::Canvas) : String #

[View source]