/ Published in: Java

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//////////////////////////////////////////////////// //resize drawable image //////////////////////////////////////////////////// public Drawable resize(Drawable image, int theWidth, int theHeight) { BT_debugger.showIt(activityName + ": method resize called"); BT_debugger.showIt(activityName + ": image resize method " + image.getBounds() + " --> " + theWidth + " x " + theHeight); Bitmap d = ((BitmapDrawable)image).getBitmap(); Bitmap bitmapOrig = Bitmap.createScaledBitmap(d, theWidth, theHeight, false); return new BitmapDrawable(bitmapOrig); }
Comments
