This appears to be an ordinary oil painting. Upon entering a room in which the painting is hung, the DM should show the players an image of the artwork. If any player should point at- or to- any figure in the painting, that player's PC and the living, three-dimensional equivalent of the figure s/he was pointing to will exchange places. The PC will appear in the painting, and the figure will appear in front of the PC's fellow adventurers.
Inside the artwork, the situation is as follows--the demon Thrigulas (a kind of Babau demon--though much depleted from lack of fresh souls), has, for the last 4000 years, been pleading with the cleric (Saint Wolfgang) to read, from the large book he holds, a divine incantation which will release them all from the artwork--offfering him any pleasure his heart can imagine. The very upright St. Wolfgang, who has sacrificed his life to help bind the demon safely in the painting and away from the Prime Material Plane, has been refusing for 4000 years. The four courtiers in the background, are, as one might expect after four miliennia, simply incredibly bored.
The painting must always contain 6 souls. A being may escape by being replaced (in the manner described above) by a living being outside the artwork. All six will be freed if a high-level cleric reads aloud the incantation in the book (though Wolfgang will go to any lengths to prevent this).
A being not part of the original 6 may be returned to ordinary life if the being s/he replaced in the painting is slain or if a living being is summoned, via spell, to replace him or her. Wolfgang, if inside the painting, will try to prevent such summonings, however, not wishing to extend the trauma of entrapment to any more souls than necessary.
The summoning method hadn't occurred to me before I put this in a dungeon, but it occurred to Caroline Pierce. She had first level monster summoning (we were running 3e) and I, thinking the 3e rules for monster summoning were pretty dull, decided she would summon a random first level creature. So, in my campaign, Thrigulas runs free, and a painted badger stands forever in his place.