The list of methods to do BufferedImage Read are organized into topic(s).
boolean
isImage(File file) Check whether a given file is an image that can be read by Java.
try {
BufferedImage img = ImageIO.read(file);
if (img == null)
return false;
return true;
} catch (Exception ex) {
return false;
boolean
isImage(File file) is Image
boolean flag = false;
try {
BufferedImage image = ImageIO.read(file);
if (image == null) {
return flag;
int width = image.getWidth();
int heigth = image.getHeight();
...
boolean
isImage(File imageFile) is Image
if (!imageFile.exists()) {
return false;
try {
Image img = ImageIO.read(imageFile);
if (img == null || img.getWidth(null) <= 0 || img.getHeight(null) <= 0) {
return false;
return true;
} catch (Exception e) {
return false;