Fix performance issue on Widnows when image is mirrored, refs #227