Skip to content

Creator

Soumya Kanti Kar edited this page Apr 4, 2018 · 4 revisions

Creator

The Creator module allows to create bitmaps. Glide is used to create the bitmaps and maintain them.

createBitmap(context: Context, width:Int, height:Int, @ColorInt color:Int): BitBeautyBitmap?
This will create a bitmap of ARGB_8888 format with the specified color.

createBitmap(context: Context, width: Int, height: Int, @ColorInt color: Int, config:Bitmap.Config): BitBeautyBitmap?
This will create a bitmap of the required configuration and the specified color.

createBitmapFromDrawable(context: Context, @DrawableRes image:Int) : Observable<BitBeautyBitmap>
Create a bitmap from the resource drawable.

createBitmapFromUrl(context: Context, url:String): Observable<BitBeautyBitmap>
Create a bitmap from the provided URL. It will download the image and then generate the bitmap from it.

createBitmapFromBitmap(context: Context, bitmap: Bitmap): BitBeautyBitmap?
Create a bitmap enclosed in BitBeautyBitmap object from an existing bitmap. Note that the existing bitmap is not recycled by this method.

Clone this wiki locally