Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/commit451/coil-transformations
Image transformations for Coil
https://github.com/commit451/coil-transformations
coil image-transformations images kotlin kotlin-android
Last synced: 3 days ago
JSON representation
Image transformations for Coil
- Host: GitHub
- URL: https://github.com/commit451/coil-transformations
- Owner: Commit451
- License: apache-2.0
- Created: 2019-08-23T16:55:50.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T05:32:45.000Z (9 days ago)
- Last Synced: 2024-11-05T06:24:02.942Z (9 days ago)
- Topics: coil, image-transformations, images, kotlin, kotlin-android
- Language: Kotlin
- Size: 8.96 MB
- Stars: 148
- Watchers: 4
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# coil-transformations
Image transformations for [Coil](https://github.com/coil-kt/coil).[![](https://jitpack.io/v/Commit451/coil-transformations.svg)](https://jitpack.io/#Commit451/coil-transformations)
## Download
Add this in your root `build.gradle` file (**not** your module `build.gradle` file):```gradle
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
Then, add the library to your app `build.gradle`
```kotlin
implementation("com.github.Commit451.coil-transformations:transformations:latest.version.here")
```
and for GPU (native) transformations (relies on [GPUImage](https://github.com/cats-oss/android-gpuimage)):
```kotlin
implementation("com.github.Commit451.coil-transformations:transformations-gpu:latest.version.here")
```
and for Google MLKit Face detection transformations:
```kotlin
implementation("com.github.Commit451.coil-transformations:transformations-face-detection:latest.version.here")
```
## Supported Transformations
These transformations are already supported in Coil itself (no need for this library):
- CircleCropTransformation
- RoundedCornersTransformationFrom the base library (`transformations`):
- BlurTransformation
- ColorFilterTransformation
- CropTransformation (top, center, bottom)
- GrayscaleTransformation
- MaskTransformation
- SquareCropTransformationFrom the GPU library (`transformations-gpu`)
- BrightnessFilterTransformation
- ContrastFilterTransformation
- InvertFilterTransformation
- KuwaharaFilterTransformation
- PixelationFilterTransformation
- SepiaFilterTransformation
- SketchFilterTransformation
- SwirlFilterTransformation
- ToonFilterTransformation
- VignetteFilterTransformationFrom the face detection library (`transformations-center-on-face`)
- CenterOnFaceTransformation## Quick Start
To load an image into an `ImageView` with transformations, use the `load` extension function:
```kotlin
imageView.load("https://www.example.com/image.jpg") {
transformations(BlurTransformation(), CircleCropTransformation()) // You can add as many as desired
}
```## Preview
See a preview of the transformations [here](https://github.com/Commit451/coil-transformations/blob/master/preview/preview.md)## Thanks
Inspired by [Glide Transformations](https://github.com/wasabeef/glide-transformations) by [wasabeef](https://github.com/wasabeef). Thanks of course to [Coil](https://github.com/coil-kt/coil) contributors for making a great image loading library.## License
Copyright 2024 Commit 451
Licensed 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 athttps://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.