Basic Copyright Information
If the painting does not have a copyright holder, and you take a photograph of it, then the photograph is yours to do with as you please, since you created it.
If the painting is not copyrighted, and someone else takes a photograph of it, you will have to secure the rights to that photograph, as it is the creation of the photographer. As an example, you can't make color copies of a postcard and sell it as your own, since someone owns the rights to the image on that postcard. The best way to handle this kind of situation is to hire a photographer under a "work for hire", agreement, making sure to specify that the copyrights to all materials produced in your employ immediately revert to you.
Finally, and most importantly, if the painting is copyrighted, you would have to get permission to photograph it, as the resulting photograph would be a reproduction of a copyrighted work. Make sure this is the case before taking pictures of the painting.