In this example, you are going to make a curl corner of the picture, it is very easy by the help of this example.
Picture: Take a picture to curl the corner of the picture.
Selection: Make selection by the polygonal lasso tool (L key) and press Del key.
Draw a shape: Choose Pen tool (P key) with any color and make this shape as I have done here.
Layer style: Go to Layer menu > Layer style > Apply Gradient overlay.
This is your curled picture.
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.