Return to Snippet

Revision: 65506
at December 9, 2013 11:35 by cruddell001


Initial Code
////////////////////////////////////////////////////
	//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);
	}

Initial URL

                                

Initial Description

                                

Initial Title
Resize Drawable Image

Initial Tags

                                

Initial Language
Java