Code I wrote a while back to prepare for saving image metadata.