How to display one image to another image

hi

i am not sure about how to describe this thread but anyway

I have two images(pictures) one is of sofa and aonther is texture design. I want that when i click button then the texture must be placed on sofa picture.
I tried with masking but i m not getting perfect result.

Please help me.

Thanx in advance.