Code example for BitmapFactory.Options

Methods: decodeFile

0
    	} 
    } 
     
     
    static public Bitmap getBitmapFromFile(String file, int height, boolean crop) {
    	Options opt = new Options();
		opt.inSampleSize = 2;
		Bitmap bm = BitmapFactory.decodeFile(file, opt);
		int width = height;
		if (!crop) {
			width = (height * bm.getWidth()) / bm.getHeight();
		} 
    	return ThumbnailUtils.extractThumbnail(bm, width, height);
    } 
 
	public static class FlushedInputStream extends FilterInputStream {
        public FlushedInputStream(InputStream inputStream) {
            super(inputStream);
        } 
 
        @Override