Code example for Bitmap

Methods: createScaledBitmapgetHeightgetWidth

0
	 * @param source 
	 * @return 
	 */ 
	private Bitmap blowup(Bitmap source) {
		if (source != null) {
			Bitmap big = Bitmap.createScaledBitmap(source, source.getWidth() * 2,  source.getHeight() * 2, true);
			BitmapFactory.Options opts = new BitmapFactory.Options();
			opts.inSampleSize = 2;
			 
			ByteArrayOutputStream os = new ByteArrayOutputStream();
			big.compress(CompressFormat.PNG, 100, os);            
			 
			byte[] array = os.toByteArray();
			return BitmapFactory.decodeByteArray(array, 0, array.length, opts);
		} 
		return null; 
	}	 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE