Ive got a following code for recognizing image types in Java from another post here on stackoverflow.
FileNameMap fileNameMap = URLConnection.getFileNameMap();
String mimeType = fileNameMap.getContentTypeFor(path);
System.out.println(mimeType);
It works fine , for jpeg , gif or png.
But the output for BMP picture is NULL. Anyone help ? :)