From the explanations given in the episode, it's not just an image but is more like the second of these. However, the entire planet Gallifrey (not just that one city) was said to have been physically removed from this universe & put into a "pocket universe" of its own. That implies it's not really inside the painting, either. The painting does have a connection with that "pocket universe" -- the Dalek falling out of the painting shows that. It's Time Lord technology & how it works hasn't been explained in detail.