fluttercommunity / flutter_blurhash

Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium. Maintainer: @Solido
https://pub.dev/packages/flutter_blurhash
MIT License
519 stars 65 forks source link

Recomended image resolutions for the algorithm #4

Closed aytunch closed 4 years ago

aytunch commented 4 years ago

For example when we encode an image of 800x600px does the blurhash represantation have a native resolution of 800x600px too? Or is it fixed? Or does it not matter and it is like a vectoral represantation and we can display the blurhash as big as we want? Also is it better in terms of performance to encode images after downsizing them to resolutions corresponding to the placeholders size on our UI?

cbenhagen commented 4 years ago

In #2 I just changed the decoding to fixed 32x32 pixels. Flutter will scale the image to whatever size you want. I would also recommend to downscale your image before encoding. For more infos please check https://github.com/woltapp/blurhash#how-fast-is-encoding-decoding.