Updated to automatically flip images correctly.
May hurt people... I feel bad... but this is the Right Thing to Do.