Here you can find the source of decodeF(File f)
Parameter | Description |
---|---|
f | the f |
private static Bitmap decodeF(File f)
//package com.java2s; import java.io.File; import java.io.FileInputStream; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { /**//w ww .jav a 2s. c o m * Decode f. * * @param f the f * @return the bitmap */ private static Bitmap decodeF(File f) { Bitmap b = null; try { BitmapFactory.Options bfo = new BitmapFactory.Options(); FileInputStream fis = new FileInputStream(f); b = BitmapFactory.decodeStream(fis, null, bfo); fis.close(); } catch (Exception e) { e.printStackTrace(); } return b; } }