title: How to extract data from BMP image using metada-extractor
body: <p>I am trying to extract metadata from a BMP image format using metadata-extractor, but it throws an exception that file type is not supported.</p>
  
  <p>Metadata-extractor:<a href="https://github.com/drewnoakes/metadata-extractor.git" rel="nofollow noreferrer">https://github.com/drewnoakes/metadata-extractor.git</a></p>
  
  <p>My code:</p>
  
  <pre><code>public class MetaDataExtractor {
  
  private Metadata metadata = null;
  
  public Metadata extractMetadata() {
  try {
          File file = new File("w3c_home.bmp");
  
          metadata = ImageMetadataReader.readMetadata(file);
      } catch (ImageProcessingException e) {
          e.printStackTrace();
      } catch (IOException e) {
          e.printStackTrace();
      }
      return metadata;
  }
  </code></pre>
  
  <p>It returns this exception on the console:
  com.drew.imaging.ImageProcessingException: File format is not supported
      at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:128)
      at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:95)
      at MetaDataExtractor.extractMetadata(MetaDataExtractor.java:16)
      at Test.main(Test.java:12)</p>