Illustrator is quite near.
Put a closed shape over a photo and use Object > Envelope distort > Make with top object:
Duplicate the curve before distorting, if you want it to stay visible.
The distorted image can be copied and pasted to Photoshop, if needed.
This is actually a form of warping. You can edit the result with the direct selection tool.
As you see, the deforming shape isn't especially complex, one can easily see how it is distorted from a rectangle. Obviously Illustrator can see the same. For that reason the result seems to be quite predictable.
But generally the result is easily non-predictable crap:
It can in this case be fixed by flipping the image and the curve (Transform > Reflect > Vertical)
Flipping the result back doesn't explode it, the result stays perfect.
I can only guess why this helped. I guess the image and the curve had opposite node order directions. Flipping reversed the curve, but not the bitmap image. Unfortunately a guru is needed to tell the truth.