Compose blurhash
Provides multiplatform library to use blurhash in your compose app.
Using SKSL/AGSL for the best possible performance compared to regular bitmap alternatives.
What platforms are currently supported
Usage
Add this to your build.gradle.kts
implementation("io.github.brys0:blurhash:0.0-4-ALPHA")
You can now use it like this
@Composable
fun MyComposable() {
BlurHashImage(
"URGtW@NM}FV?w7={wOi{xYi%s,sm-CNZnPxt",
modifier = Modifier.fillMaxSize()
)
}
Project Structure
This project contains several modules each for a different purpose.
blurhash - Contains the public code for implementing in your project
blurhash-skio - Contains the code specific to skia related implementations (WasmJS/Desktop/iOS)
blurhash-shader - Contains the shader related code and processing
sample - Contains a super simple sample project to demo the functionality
Accreditation
- peerless2012 For personally helping me get this project adapted over to compose and for his blurhash implementation for android
- For providing a reference on implementation, as well as creating a very simplistic and elegant solution to placeholder images