Get ready to learn a simple technique to change the head by another head, you can also change a human face also. Here, I am going to replace a "Cow" head by a "Elephant's". This example has easy steps so pay attention on every step.
An Image: First take any image to modify as I have got here a cow image.
Make Selection: Select which part you want to replace by the Polygonal Lasso Tool (L key).
Delete Selection: After selection press del key.
Another Image: Now open an "Elephant" picture to take head portion.
Selection: Make selection head by Polygonal Lasso Tool (L key) and make copy.
Paste Image: Now paste "Elephant" head as copied up.
Transform: Go to Edit Menu > Free Transform then go to again Edit Menu > Transform and click on Flip Horizontal. You can also do it without menu bar, press Ctrl + T then right click and choose "Flip Horizontal".
You will get it.
Adjustment: Now make adjustment for looking a real "Cow" head as here.
Remove Un wanted area: After adjustment if you got any un covered area by the head so remove them. Select Clone Stamp Tool (S key) and take color from a point that should be near removal area.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.