I don't wanna be a jerk, but the man told you how to get the angle and then how to use that angle to rotate the image. You just copy/paste his code and then come back here and say it doesn't work all the way? Do some testing, debugging, don't ask for every little step to be fed to you.