That is unless someone owns the photograph or the subject. Say for example if it was a photo from a professional photographer or maybe a photo of a owned (copyright) image.
No it is not. As long as it's not in anyway a photocopied painting as in, you looked at the photo and then painted in, not you scanned in the photo printed out a guide and then painted it.