Step 1: First things first!
Step 2: Put both images into photoshop
(Filter > Blur > Gaussian Blur) and experiment with the radius to hide the detail of the fabric, keeping only the folds.
Step 3: SAVE!
make sure you save as a PSD or the next few steps wont work out.
Step 4: Next up: the flag image
use the same settings as i have done in the picture.
Step 6: Adding the wavyness
Step 7: Your finished!
vote for me to win, and i'll give you a cookie.