A painting made from a photograph is known as a derivative work. But that doesn't mean you can simply make a painting from any photo you find -- you need to check the copyright situation of the photo. Don't assume because the likes of Warhol used contemporary photos that it means it's okay if you do.
The creator of the photograph, i.e. the photographer, usually holds the copyright to the photo and, unless they've expressly given permission for its use, making a painting based on a photo would infringe the photographer's copyright. In terms of US copyright law: "Only the owner of copyright in a work has the right to prepare, or to authorize someone else to create, a new version of that work."1 You may be able to obtain permission to use a photo for a derivative work from the photographer, or if you're using a photo library buy the right to use it.
You might argue that the photographer is unlikely ever to find out if you use it, but are you going to keep a record of such paintings to ensure you never put it on display or offer it for sale? Even if you're not going to make commercial use of a photo, just by creating a painting to hang in your home, you're still technically infringing copyright, and you need to be aware of the fact. (Ignorance is not bliss.)
The easiest solution to avoiding copyright issues when painting from photos is to take your own photos, or use the Artist's Reference Photos on this website, photos from somewhere such as Morgue File, which provides "free image reference material for use in all creative pursuits", or to use several photos for inspiration and reference for your own scene, not copy them directly. Another good source of photos are those labeled with a Creative Commons Derivatives License in Flickr.
Photos being labeled "royalty-free" in photo libraries does not mean "copyright free". Royalty free means that you can buy the right from the copyright holder to use the photo wherever you want, whenever you want, how many times you want, rather than purchasing the right to use it once for a specific project and then paying an additional fee if you used it for something else.
As for the argument that it's fine to make a painting from a photo provided it doesn't say "do not duplicate" or because 10 different artists would produce 10 different paintings from the same photo, it's a misconception that photos aren’t subject to the same stringent copyright rules as paintings. It seems that all too often artists who would scream if someone copied their paintings, don’t hesitate to make a painting of someone else’s photo, with no thought to the creator’s rights. You wouldn't say "as long as a painting doesn't say 'do not duplicate' that anyone can photograph it and declare it their original creation".
The absence of a copyright notice on a photo doesn’t mean copyright doesn't apply. And if a copyright statement says ©2005, this doesn’t mean that copyright expired at the end of 2005; it generally expires several decades after the creator’s death.
- Copyright FAQ: Can You Make Paintings from Reference Photos in Books or Field Guides?
- Copyright for Artists FAQ: If I Change 10 Percent, Isn't It New?
- Full Artist's Copyright FAQ
• 1. Copyright Registration for Derivative Works, US Copyright Office Circular 14, 05/2008
Disclaimer: The information given here is based on US copyright law and is given for guidance only; you're advised to consult a copyright lawyer on copyright issues.