// Write the current in-memory metadata back to its file.
void commit() {
ImageType type = meta.getImageType();
try {
type.writeMetadata(info);
}
catch (Throwable t) {
// BadImageFileException, IOException, UnknownImageTypeException
t.printStackTrace();
// do nothing, hope the user figures it out