"Painting people and ghosts are superior, and they are greedy and ruthless." Who is this couplet written for? Which dynasty is it from?

"Painting people and ghosts is superior, and thorns are greedy and cruel."

This is a couplet inscribed by Guo Moruo for Liao Zhai Tang in Pu Songling Memorial Hall. Pu Songling, of course. Pu Songling (1640- 17 15) was born in the late Ming Dynasty and died in the early Qing Dynasty.