Skip to content

Siskin-framework/Rebol-BlurHash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rebol-BlurHash CI

Rebol/BlurHash

Wolt's BlurHash as an extension for Rebol3.

Usage

blurhash: import 'blurhash

;; load some input image...
image: load %test/koule.jpg

;; encode the image into blurhash text...
hash: blurhash/encode image

;; display the result in console...
? hash

;; HASH is a string of value: "KRG[vKbFE1^^cnNs+}Q$*kD"

;; decode the hash back to image of specified size...
blured1: blurhash/decode hash 512x512

;; ... or into some existing image...
blurhash/decode hash image

For better performance (cca 10x faster) when displaying many blured images, it is better to decode into a small image and then resize the result. Like:

blured2: blurhash/decode hash 32x32
blured2: resize blured2 512x512

Which can be written also like:

blured2: resize blurhash/decode hash 32x32 512x512

Original image:

original

Blured image using direct size:

blured1

Blured image using small size 32x32 and then resized:

blured2