Using java Syntax Highlighting
- //load the source image for scale
- Resources rs = ctx.getResources();
- Bitmap tmpImage = BitmapFactory.decodeResource(rs, R.drawable.aircraft);
- Matrix m = new Matrix(); //an object for scale and other operations.
- m.setScale(50.0F, 50.0F); //set the size of the image that after scaled
- //scale the source image and save the result to target image
- Bitmap image = Bitmap.createBitmap(tmpImage,0,0,tmpImage.getWidth(),tmpImage.getHeight(),m,true);
Parsed in 0.032 seconds, using GeSHi 1.0.8.4



