Added a flip parameter to the images