@NotNull
public static BmpHeaderDirectory processBytes(@NotNull String file) throws Exception
{
Metadata metadata = new Metadata();
InputStream stream = new FileInputStream(file);
new BmpReader().extract(new StreamReader(stream), metadata);
stream.close();
BmpHeaderDirectory directory = metadata.getDirectory(BmpHeaderDirectory.class);
assertNotNull(directory);
return directory;