Flattening large numbers of water damaged photos