Example by Toulouse Lautrec
Photography was invented in the 1820s and developed and popularized during the rest of the century. The second half of the 19th century also saw big changes in painting - realism, impressionism and post-impressionism. This site in Spanish describes the influence which the invention of photography had on 19th century painting. Enjoy the pictures if you don't understand Spanish. La Visión Fotográfica en la Pintura - Impresionismo y Fotográfia
Update 23/1: some more links on the subject at Metafilter. Thanks PK!