Android examples for Graphics:Image File
is Valid Image Path
//package com.java2s; import android.graphics.BitmapFactory; public class Main { public static boolean isValidImagePath(String strImagePath) { if (strImagePath == null) { return false; }/*from w w w .ja v a 2s.c o m*/ BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeFile(strImagePath, options); return (options.outMimeType != null); } }