The Headmasters are charmed to appear once they die, or retire I suppose, unless they quit ignobly like Snape, but I can't think of anything else we know canonically about portraits.
What do we know about portrait... tech? How do they talk? Do they always talk?
Are they painted after the person has died? Are they painted before the person has died but charmed afterwards? Is there no physical painting required but something else (hair, blood) that goes on to the canvas and later creates the image of the person?
Yeah the talking portraits are interesting. If something special is needed to make the headmaster/mistress paintings talk what about their other paintings? What about Phineas Nigellus Black, for example, he had a portrait in Grimmauld Place that could talk. Did that painting need the same magic as the on in the Headmasterís office, if so was did it need to be painted after his death to be able to talk? Or does the magic used to make the painting in the Headmasterís office talk extend then extend to all other paintings of the same person? HmmmÖ.
We actually had a class devoted to this topic a while back. I wonder if the threads are still archived somewhere...
But we did discuss a lot of things, such as how the portraits were able to talk. It was suggested that, just like with moving photography, some sort of potion was mixed in with the paint or some spell was cast on the canvas or the brushes. Another theory was that a physical piece of the person being painted was needed in order to imprint the actual soul of the person and give them memories of their previous life.
You may have to get creative on this.
It wasn't really decided upon whether the person was living or dead would make a difference. I always though no, but as there is still no canon on the topic, you could probably do with whatever fits best in your story.