// create affine transform to flip CIImage let affineTransform: NSAffineTransform = NSAffineTransform