# RoundedBitmapDrawableFactory

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory#)  

# RoundedBitmapDrawableFactory

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
RoundedBitmapDrawableFactory
`  
`

extends Object


``


`

|---|-------------------------------------------------------------------|
| java.lang.Object                                                     ||
| ↳ | android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory |

<br />

*** ** * ** ***

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

## Summary

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

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public methods

### create

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
RoundedBitmapDrawable create (Resources res, 
                String filepath)
```

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

<br />

|           Parameters           ||
|------------|--------------------|
| `res`      | `Resources` <br /> |
| `filepath` | `String` <br />    |

|                                                               Returns                                                               ||
|-----------------------------------------------------------------------------------------------------------------------------|--------|
| [RoundedBitmapDrawable](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable) | <br /> |

### create

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
RoundedBitmapDrawable create (Resources res, 
                Bitmap bitmap)
```

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

<br />

|          Parameters          ||
|----------|--------------------|
| `res`    | `Resources` <br /> |
| `bitmap` | `Bitmap` <br />    |

|                                                               Returns                                                               ||
|-----------------------------------------------------------------------------------------------------------------------------|--------|
| [RoundedBitmapDrawable](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable) | <br /> |

### create

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
RoundedBitmapDrawable create (Resources res, 
                InputStream is)
```

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

<br />

|         Parameters          ||
|-------|----------------------|
| `res` | `Resources` <br />   |
| `is`  | `InputStream` <br /> |

|                                                               Returns                                                               ||
|-----------------------------------------------------------------------------------------------------------------------------|--------|
| [RoundedBitmapDrawable](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable) | <br /> |

-

  ## Classes

  - [DrawableCompat](https://developer.android.com/reference/android/support/v4/graphics/drawable/DrawableCompat)
  - [IconCompat](https://developer.android.com/reference/android/support/v4/graphics/drawable/IconCompat)
  - [RoundedBitmapDrawable](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawable)
  - [RoundedBitmapDrawableFactory](https://developer.android.com/reference/android/support/v4/graphics/drawable/RoundedBitmapDrawableFactory)