Android Drawable to Bitmap Convert convertToBitmap(final Drawable drawable)

Here you can find the source of convertToBitmap(final Drawable drawable)

Description

convert To Bitmap

Declaration

public static Bitmap convertToBitmap(final Drawable drawable) 

Method Source Code

//package com.java2s;

import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;

public class Main {
    public static Bitmap convertToBitmap(final Drawable drawable) {
        return ((BitmapDrawable) drawable).getBitmap();
    }//ww w. j a  va  2s .  com
}

Related

  1. drawableToBitmap(Drawable drawable)
  2. drawableToBitmap(Drawable drawable)
  3. drawableToBitmap(Drawable drawable)
  4. drawableToBitmap(Drawable drawable)
  5. drawableToBitmap(Drawable drawable)
  6. drawableToBitmap(Drawable drawable)
  7. drawableToBitmap(Drawable drawable)
  8. getMutableBitmap(Drawable drawable)