Hi Littlemonster,
This issue has been in the news (well in the IP world anyway!) recently as a couple of successful artists have lost court cases over copying from photographs. You can find details
here and
here.
It all depends on the extent of the copying. If you use a photograph as a reference but produce a painting which is not a slavish copy, then it is less likely that your work will infringe the copyright of the original photographer. If you use several different photographs as your inspiration you will dilute the chances infringing any one photoragher's copyright even further.
Permission is the alternative method, and if it was granted, then you could make a close copy without running any risk. One of the biggest hurdles is finding out who is the copyright owner, and even if you have a name, it's not always easy to trace the person. But you must try to do this if you want to get permission. By the way in the case of John Lennon, it's the photographer whose work you use, not the person portrayed, from whom you need permission. If the photographer is dead, you will need to contact whoever has inherited his/her estate.
Where stills from films or TV programmes are concerned the copyright is normally jointly owned by the director and the producer, or the TV company, so they are much easier to track down. The artwork and/or photograph on an album cover may well have been commissioned by the record company and so they will own the rights. In any case it is best to contact them first and they will be able to refer you to the copyright owner if they don't hold it.
Whether you own copyright in the painting you make will largely depend on which of the two approachs you adopt. If you have permission to copy, then yours will be a derivative work, which will in all likelihood have sufficient additional creative work in it to qualify for copyright. However if you merely use a photograph as a reference, and produce a wholly diffferent image, assuming that a court agrees that there is no copying, you will have copyright in your work as a wholly original image.
Finally, you mentioned 'defamatory' treatment. The law actually calls this derogatory treatment. And it is quite difficult for a copyright owner to prove this. Firstly, he has to prove that your work is a copy of his. Obviously if he had given permission then your image may well be a 'legal' copy. But if you have merely used his image as a reference source, then he would need to establish that the average person seeing your work is likely to think that it is his work. Secondly your work needs to damage his professional reputation in a serious way. This is quite different to the normal law of defamation.