You can find the formula of a Bezier curve from given points. As far as I can tell, Photoshop is keeping vertical lines straight. It picks four equidistant points on top and bottom curves, and cut these lines from 1/3 and 2/3. With this you will have two sets of 4 points on the new Bezier curves running along the image. You can find their formula. These lines are the ones that are visible over the image. Finally, you can apply this every line to reach to the final image.