Skip to content

Commit b9eadf2

Browse files
committed
Update readme
1 parent 0073e1b commit b9eadf2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ val compressedImageFile = Compressor.compress(context, actualImageFile) {
6060
format(Bitmap.CompressFormat.WEBP)
6161
}
6262
```
63+
#### You can create your own extension too
64+
```kotlin
65+
fun Compression.lowerCaseName() {
66+
constraint(MyLowerCaseNameConstraint())
67+
}
68+
69+
val compressedImageFile = Compressor.compress(context, actualImageFile) {
70+
lowerCaseName() // your own extension
71+
quality(80) // combine with compressor constraint
72+
format(Bitmap.CompressFormat.WEBP)
73+
}
74+
```
75+
6376
### Compressor now is using Kotlin coroutines!
6477
#### Calling Compressor should be done from coroutines scope
6578
```kotlin

0 commit comments

Comments
 (0)