Perhaps it would make sense to store the orientation as a matrix transformation then? That would cover all the possible EXIF orientation values.