Code example for BitmapFactory.Options

Methods: decodeStream

0
		 
		return bmp;
	} 
	 
	private Bitmap openSampledImage(Uri uri, int sampleSize) throws Exception {
		Options options = new BitmapFactory.Options();
		options.inSampleSize = sampleSize;
		return openImageWithOptions(uri, options);
	} 
	 
	private Bitmap openImageWithOptions(Uri uri, Options options) throws Exception {
		InputStream in = context.getContentResolver().openInputStream(uri);
		Bitmap bmp = BitmapFactory.decodeStream(in, null, options);
		in.close();
		return bmp;
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE