# RoundedBitmapDrawableFactory

# RoundedBitmapDrawableFactory

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/graphics/drawable/RoundedBitmapDrawableFactory.java+class:androidx.core.graphics.drawable.RoundedBitmapDrawableFactory)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawableFactory "View this page in Java")

<br />

```
class RoundedBitmapDrawableFactory
```

<br />

*** ** * ** ***

Constructs[RoundedBitmapDrawable](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/RoundedBitmapDrawable)objects, either from Bitmaps directly, or from streams and files.

## Summary

|                                                            ### Public functions                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[RoundedBitmapDrawable](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/RoundedBitmapDrawable) | [create](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/RoundedBitmapDrawableFactory#create(android.content.res.Resources,android.graphics.Bitmap))`(res: `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)`, bitmap: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`?)` Returns a new drawable by creating it from a bitmap, setting initial target density based on the display metrics of the resources. |
| `java-static `[RoundedBitmapDrawable](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/RoundedBitmapDrawable) | [create](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/RoundedBitmapDrawableFactory#create(android.content.res.Resources,java.lang.String))`(res: `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)`, filepath: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Returns a new drawable, creating it by opening a given file path and decoding the bitmap.                                             |
| `java-static `[RoundedBitmapDrawable](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/RoundedBitmapDrawable) | [create](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/RoundedBitmapDrawableFactory#create(android.content.res.Resources,java.io.InputStream))`(res: `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)`, is: `[InputStream](https://developer.android.com/reference/java/io/InputStream.html)`)` Returns a new drawable, creating it by decoding a bitmap from the given input stream.                                                      |

## Public functions

### create

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun create(res: Resources, bitmap: Bitmap?): RoundedBitmapDrawable
```

Returns a new drawable by creating it from a bitmap, setting initial target density based on the display metrics of the resources.  

### create

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun create(res: Resources, filepath: String): RoundedBitmapDrawable
```

Returns a new drawable, creating it by opening a given file path and decoding the bitmap.  

### create

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
java-static fun create(res: Resources, is: InputStream): RoundedBitmapDrawable
```

Returns a new drawable, creating it by decoding a bitmap from the given input stream.