Reuniting legends in a TV ad -- Humphrey Bogart, Jimmy Cagney, and Louis Armstrong appear with Elton John in a soda commercial

You’ve seen the commercial by now. Humphrey Bogart walks into a nightclub — ”Hello, Joe, what do you know?” — and a hostess turns around to greet him. Pretty people are dancing, and Jimmy Cagney is drinking at the bar, while across the room Elton John pounds a piano as Louis Armstrong blows his horn.

More than any other commercial, diet Coke’s new spot begs the question: How’d they do that? The answer: It took ad, production, and special-effects people 1,700 working hours and the following stages:

Each of the ”icons” (the captured images of Bogart, Cagney, and Armstrong) was transferred from its original film to D-1 digital videotape in order to ”steady” the image. Bogart was plucked from All Through the Night (1942), and Armstrong from High Society (1956); Cagney’s entrance was taken from Public Enemy (1931) and his interlude at the bar from The Roaring Twenties (1939).

The background scene, with John and crew, was choreographed and lit to accommodate the icons, which were colorized and integrated later.

Some foreground scenes were shot separately against green screens to create an illusion of depth, so that the hostess, for example, appears to be standing in front of Bogart.

Finally, the special-effects editors made a video sandwich. In the scene shown, for example, three different images — Bogie, the background, and the waitress — were superimposed on one another, frame by frame.

Bogie, Cagney, and Satchmo might have objected to hawking soda, but there’s not much they can do about it now: While some stars’ estates do control the use of their images, such rights can be purchased, as Coke did for this commercial. As a matter of fact, because of its popularity, we’ll probably be seeing other dead stars resurfacing between TV shows — perhaps Fred Astaire tripping the light fantastic with Paula Abdul?