Code example for Bitmap

Methods: getConfiggetDensitygetHeightgetRowBytesgetWidth

public class BitmapUtil { 
	public static final String toString(Bitmap bm){
		StringBuffer sb = new StringBuffer();
		sb.append(" config=" + bm.getConfig());
		sb.append(" width=" + bm.getWidth());
		sb.append(" height=" + bm.getHeight());
		sb.append(" density=" + bm.getDensity());
		sb.append(" rowBytes=" + bm.getRowBytes());
		return sb.toString();
	 * 将Drawable转化为Bitmap 
	public static final Bitmap decode(Drawable drawable) {
		int width = drawable.getIntrinsicWidth();
		int height = drawable.getIntrinsicHeight();
Connect your IDE to all the code out there  Get Codota for Java