Provides multiplatform library to use blurhash in your compose app.
Using SKSL/AGSL for the best possible performance compared to regular bitmap alternatives.
- WasmJS/Browser
- Desktop/JVM
- iOS/Apple
- Android
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", // Your blurhash string
modifier = Modifier.fillMaxSize() // Modifiers you would like to apply
)
}This project contains several modules each for a different purpose.
blurhash- Contains the public code for implementing in your projectblurhash-skio- Contains the code specific to skia related implementations (WasmJS/Desktop/iOS)blurhash-shader- Contains the shader related code and processingsample- Contains a super simple sample project to demo the functionality
- peerless2012 For personally helping me get this project adapted over to compose and for his blurhash implementation for android
- blurha For providing a reference on implementation, as well as creating a very simplistic and elegant solution to placeholder images
- shady For providing a reference on how to implement shader based code into compose specifically
- blurhash_shader For providing the initial shader code to base sksl shader code off of
- Romain Guy For providing a fast and performant color calculation for blurhash strings