Auto Adjust Image

hey everyone, I have another question for you. I have something I’m working on where I want images to load and auto adjust. It’s hard to explain, but here’s an image of what I want. I want image one to come up, and then when the user clicks the next button, I want the picture to adjust to be the shape of number 2, etc. Kind of like shadow box. Any suggestions?