Android Drawable to Bitmap Convert getBitmap(Resources resources, int drawableResourceId)

Here you can find the source of getBitmap(Resources resources, int drawableResourceId)

Description

get Bitmap

Declaration

public static Bitmap getBitmap(Resources resources,
            int drawableResourceId) 

Method Source Code

//package com.java2s;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class Main {
    public static Bitmap getBitmap(Resources resources,
            int drawableResourceId) {
        return BitmapFactory.decodeResource(resources, drawableResourceId);
    }/*  ww  w .  j  a  v a  2s  .  com*/
}

Related

  1. DrawableToBitmap(Drawable drawable)
  2. convertDrawableToBitmap(Drawable drawable)
  3. drawable2Bitmap(Drawable drawable)
  4. drawableToBitmap(Drawable drawable)
  5. drawableToBitmap(Drawable drawable, int width, int height)
  6. getBitmapDrawable(Context context, int resId)
  7. from(Drawable drawable)
  8. drawableToBitmap(Drawable drawable)
  9. drawableToBitmap(Drawable drawable)