sherief / thumbhash

A very compact representation of an image placeholder

Home Page:https://evanw.github.io/thumbhash/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ThumbHash

A very compact representation of a placeholder for an image. Store it inline with your data and show it while the real image is loading for a smoother loading experience. It's similar to BlurHash but with the following advantages:

  • Encodes more detail in the same space
  • Much faster to encode and decode
  • Also encodes the aspect ratio
  • Gives more accurate colors
  • Supports images with alpha

Despite doing all of these additional things, the code for ThumbHash is still similar in complexity to the code for BlurHash. One potential drawback compared to BlurHash is that the parameters of the algorithm are not configurable (everything is automatically configured).

A demo and more information is available here: https://evanw.github.io/thumbhash/.

About

A very compact representation of an image placeholder

https://evanw.github.io/thumbhash/

License:MIT License


Languages

Language:Swift 35.7%Language:Java 24.1%Language:Rust 21.6%Language:JavaScript 18.7%