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
528 stars 66 forks source link

How to get hash #36

Closed herowws closed 2 years ago

herowws commented 2 years ago

How to get hash

MrLightful commented 2 years ago

Usually, you probably want to hash the image on the backend side. You can find different packages that can be used HERE. This plugin doesn't seem to implement this functionality. It's just a decoder.

In the link above, you can also find encoder implementations for Swift and Kotlin, so I guess you can use them. Although it may take some work to integrate them into Flutter by yourself.

Edit: although there is this Dart package that does encoding. So you can use it as well.

elkhalifte commented 2 years ago

Here is your answer Link

Solido commented 2 years ago

You are right. Thanks for pointing to a Dart encoder as I currently only support decoding. Encoding is a expensive task and should be optimized and the C impl can be easily integrated leading to top perfs and costs.