Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wasabeef/composable-images

The Composable Images is a library providing Jetpack Compose wrapper for Glide, Picasso, and Coil.
https://github.com/wasabeef/composable-images

android coil glide jetpack-compose picasso

Last synced: 3 months ago
JSON representation

The Composable Images is a library providing Jetpack Compose wrapper for Glide, Picasso, and Coil.

Awesome Lists containing this project

README

        















## What is Composable Images?

The Composable Images is a library providing Jetpack Compose wrapper for [Coil], [Glide], and [Picasso].












## Installation

### Requirements
- Android 5.0+ Lollipop (API level 21)

### Repository
```gradle
repositories {
jcenter()
}
```

#### For [Coil]
```gradle
dependencies {
implementation 'jp.wasabeef.composable:coil:1.x.x'
}
```
```kotlin
CoilImage(
model = "https://images.unsplash.com/photo-1588952159215-a4b39193464e",
modifier = Modifier.preferredWidth(240.dp)
) {
transformations(
BlurTransformation(context, 25f, 2f)
)
}
```

#### For [Glide]
```gradle
dependencies {
implementation 'jp.wasabeef.composable:glide:1.x.x'
}
```
```kotlin
GlideImage(
model = "https://images.unsplash.com/photo-1588952159215-a4b39193464e",
modifier = Modifier.preferredWidth(120.dp),
options = RequestOptions().centerCrop())
```

#### For [Picasso]
```gradle
dependencies {
implementation 'jp.wasabeef.composable:picasso:1.x.x'
}
```
```kotlin
PicassoImage(
model = "https://images.unsplash.com/photo-1588952159215-a4b39193464e",
modifier = Modifier.preferredWidth(120.dp),
) {
centerInside()
rotate(90f)
}
```

## Development

### Setup

Things you will need

- Linux, Mac OS X, or Windows.
- [Android Studio (Preview)](https://developer.android.com/studio/preview)
- npm

```
$ npm install
```

### Build

```
$ ./gradlew assemble
```

### Formatting

```
$ ./gradlew ktlint
```

### Publishing to [Bintray](https://bintray.com/bintray/jcenter)

```
$ ./gradlew clean install build
$ ./gradlew bintrayUpload -PbintrayUser=******** -PbintrayKey=***************
```

[Coil]: https://github.com/coil-kt/coil
[Glide]: https://github.com/bumptech/glide
[Picasso]: https://github.com/square/picasso
[Fresco]: https://github.com/facebook/fresco