I am trying to create some sort of poster preview, like this:

using this inner image:

and this outer image that should give the "wave" shape and has the shadow:

and this image for the displacement map:

The result image I'd like should have the inner image displaced a bit, to follow the wave from the outer image.
I made it work with 2 convert commands, I also made it work with 1 convert but without displacing the inner image but for the life of me I can't make it work completely with 1 convert command.
This works, but it's not displacing the inner image:
Code: Select all
convert outer.png \( inner.jpg -repage +30+30 -scale x597 \) +swap -mosaic result.jpg
Code: Select all
convert outer.png \( inner.jpg -repage +30+30 -scale x597 displacement.png -compose displace -define compose:args=20x0 -composite \) +swap -layers merge result.jpg
Any hints?