Java tutorial
//package com.java2s; import android.graphics.BitmapFactory; public class Main { public static boolean checkImgCorrupted(String filePath) { BitmapFactory.Options options = null; if (options == null) { options = new BitmapFactory.Options(); } options.inJustDecodeBounds = true; BitmapFactory.decodeFile(filePath, options); if (options.mCancel || options.outWidth == -1 || options.outHeight == -1) { return true; } return false; } }