Skip to content

Dimensionscape/OpenFL-Blurhash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

OpenFL-Blurhash

OpenFL-Blurhash Decoder for Haxe and OpenFL that allows you to integrate beautiful image placeholders in your apps when the original takes too long to load from an external web service. Simply use one of the backend encoder libraries from https://blurha.sh/ and pass compact, Base83 encoded strings to the client very quickly in order to render Bitmap placeholders while the actual image is loading.

Image of example

Example usage:

var placeHolderBitmapData: BitmapData = Decoder.decode("LKO2?V%2Tw=w]~RBVZRi};RPxuwH", 400, 200);
addChild(new Bitmap(placeHolderBitmapData));

Starling Usage:

var placeHolderBitmapData: BitmapData = Decoder.decode("LKO2?V%2Tw=w]~RBVZRi};RPxuwH", 400, 200);
var image:Image = new Image(Texture.fromBitmapData(placeHolderBitmapData));
addChild(image);

Enjoy!

(Currently only works for Neko and HTML5. Cpp in progress.)

About

Blurhash Decoder for Haxe and OpenFL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages