Please make this object a constant somewhere. (It could be a property of the parseJPEGMetadata function itself, or you could define the function inside of a closure).  Like this, we have to re-create the object each time the function runs.  

Actually, you could replace the data structure with a switch statement. That might be easier.  Please do the same for the mirroring object below.