https://github.com/t8rin/blurtransformation
Blur effect for Coil AsyncImage
https://github.com/t8rin/blurtransformation
android blur blur-effect blur-image coil coil-kotlin image-processing jetpack-compose kotlin
Last synced: 4 months ago
JSON representation
Blur effect for Coil AsyncImage
- Host: GitHub
- URL: https://github.com/t8rin/blurtransformation
- Owner: T8RIN
- License: apache-2.0
- Created: 2022-12-08T06:44:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-24T19:31:28.000Z (over 2 years ago)
- Last Synced: 2024-04-16T12:35:28.782Z (about 1 year ago)
- Topics: android, blur, blur-effect, blur-image, coil, coil-kotlin, image-processing, jetpack-compose, kotlin
- Language: Kotlin
- Homepage:
- Size: 17.6 KB
- Stars: 38
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BlurTransformation
This class will help to add blur effect on coil AsyncImage
Copy BlurTranformation.kt file to your repository and you are ready to engage!
```kotlin
//Usage example
val request = ImageRequest.Builder(context)
.data("https://avatars.githubusercontent.com/u/52178347?v=4")
.transformations(
listOf(
BlurTransformation(
scale = 0.5f,
radius = 25
)
)
)
.build()
AsyncImage(
model = request,
modifier = Modifier.size(100.dp)
/*your other params*/
)
```## Note
Also remember to add this dependencies to local build.gradle folder
```kotlin
//Coil
implementation("io.coil-kt:coil:2.2.2")
implementation("io.coil-kt:coil-compose:2.2.2")
```## Find this repository useful? :heart:
Support it by joining __[stargazers](https://github.com/t8rin/blurtransformation/stargazers)__ for this repository. :star:
And __[follow](https://github.com/t8rin)__ me for my next creations! 🤩# License
```xml
Designed and developed by 2022 T8RINLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```