The original ending to the Cain novella called for the characters to commit double suicide.
Suicide, however, was strictly forbidden at the time by the Production Code as a way to resolve a plot, so Wilder wrote and filmed a different ending in which Neff goes to the gas chamber while Keyes watches.
This scene was shot before the scenes that eventually became the film's familiar ending, and once that final intimate exchange between Neff and Keyes revealed its power to Wilder, he began to wonder if the gas chamber ending was needed at all. "
You couldn't have a more meaningful scene between two men", Wilder said.
He later recounted: "The story was between the two guys.
I knew it, even though I had already filmed the gas chamber scene ... So we just took out the scene in the gas chamber," despite its $150,000 cost to the studio.
Removal of the scene, over Chandler's objection, removed Production Code head Joseph Breen's single biggest remaining objection to the picture that regarded it as "unduly gruesome" and predicted that it never would be approved by local and regional censor boards.
The footage and sound elements are lost, but production stills of the scene still exist.

The look of the film was achieved through the work of cinematographer John F. Seitz.
At the time, Seitz was the premiere director of photography on the Paramount lot; his work extended back to the silent era.
Wilder had worked with Seitz on his previous film, Five Graves to Cairo, in which Seitz was nominated for an Academy Award, and Wilder praised Seitz's willingness to experiment and fail.
Here Wilder taps into his 1920s Berlin roots, and he and Seitz give the film a look subtly reminiscent of German expressionism, with dramatic deployment of light and shadows. "
He was ready for anything", Wilder said. "
Sometimes the rushes were so dark that you couldn't see anything.
He went to the limits of what could be done."
They contrasted the bright sunny Southern California exteriors, shot on location, with dark, gloomy, rotten interiors shot on sound stages to give the audience a sense of what lurks just beneath the facade – and just who is capable of murder.
The contrast was heightened, in Wilder's words, by "dirtying up" the sets.
Once the set was ready for filming, Wilder went around and overturned a few ashtrays to give the house an appropriately grubby look.
Wilder and Seitz also blew aluminum particles into the air so that, as they floated down, they looked just like dust.

Another technique Seitz used was "venetian blind" lighting which almost gives the illusion of prison bars trapping the characters.
Barbara Stanwyck later reflected, "... and for an actress, let me tell you the way those sets were lit, the house, Walter's apartment, those dark shadows, those slices of harsh light at strange angles – all that helped my performance.
The way Billy staged it and John Seitz lit it, it was all one sensational mood."

For Neff's office at Pacific All Risk, Wilder and set designer Hal Pereira conspired to create a little in-house joke, typical of Billy Wilder.
In the opening scenes, as Walter Neff stumbles off the elevator on his way to his office to record his confession, the vast two-tiered office is empty and dark.
With the camera following him, Neff lurches towards the balcony railing overlooking rows and rows of uniform corporate desks.
Neff turns left, but the camera continues forward until it reaches the brink and stares down for an anxious moment into a colorless American business purgatory.
Here, Pereira is said to have copied an existing office: the corporate headquarters of Paramount Pictures in New York City.

Wilder also decked Stanwyck out in the blonde wig "to complement her anklet ... and to make her look as sleazy as possible."
This wig has been cited by some as being the picture's biggest flaw claiming that it looks too "fake".
According to Wilder, this was exactly what he was going for when he chose the wig wanting to project, "the phoniness of the girl – Bad taste, phony wig", with cheap perfume to match.
Unconvinced, Paramount production he
The original ending to the Cain novella called for the characters to commit double suicide. Suicide, however, was strictly forbidden at the time by the Production Code as a way to resolve a plot, so Wilder wrote and filmed a different ending in which Neff goes to the gas chamber while Keyes watches. This scene was shot before the scenes that eventually became the film's familiar ending, and once that final intimate exchange between Neff and Keyes revealed its power to Wilder, he began to wonder if the gas chamber ending was needed at all. "You couldn't have a more meaningful scene between two men", Wilder said. He later recounted: "The story was between the two guys. I knew it, even though I had already filmed the gas chamber scene ... So we just took out the scene in the gas chamber," despite its $150,000 cost to the studio. Removal of the scene, over Chandler's objection, removed Production Code head Joseph Breen's single biggest remaining objection to the picture that regarded it as "unduly gruesome" and predicted that it never would be approved by local and regional censor boards. The footage and sound elements are lost, but production stills of the scene still exist.
The look of the film was achieved through the work of cinematographer John F. Seitz. At the time, Seitz was the premiere director of photography on the Paramount lot; his work extended back to the silent era. Wilder had worked with Seitz on his previous film, Five Graves to Cairo, in which Seitz was nominated for an Academy Award, and Wilder praised Seitz's willingness to experiment and fail. Here Wilder taps into his 1920s Berlin roots, and he and Seitz give the film a look subtly reminiscent of German expressionism, with dramatic deployment of light and shadows. "He was ready for anything", Wilder said. "Sometimes the rushes were so dark that you couldn't see anything. He went to the limits of what could be done." They contrasted the bright sunny Southern California exteriors, shot on location, with dark, gloomy, rotten interiors shot on sound stages to give the audience a sense of what lurks just beneath the facade – and just who is capable of murder. The contrast was heightened, in Wilder's words, by "dirtying up" the sets. Once the set was ready for filming, Wilder went around and overturned a few ashtrays to give the house an appropriately grubby look. Wilder and Seitz also blew aluminum particles into the air so that, as they floated down, they looked just like dust.
Another technique Seitz used was "venetian blind" lighting which almost gives the illusion of prison bars trapping the characters. Barbara Stanwyck later reflected, "... and for an actress, let me tell you the way those sets were lit, the house, Walter's apartment, those dark shadows, those slices of harsh light at strange angles – all that helped my performance. The way Billy staged it and John Seitz lit it, it was all one sensational mood."
For Neff's office at Pacific All Risk, Wilder and set designer Hal Pereira conspired to create a little in-house joke, typical of Billy Wilder. In the opening scenes, as Walter Neff stumbles off the elevator on his way to his office to record his confession, the vast two-tiered office is empty and dark. With the camera following him, Neff lurches towards the balcony railing overlooking rows and rows of uniform corporate desks. Neff turns left, but the camera continues forward until it reaches the brink and stares down for an anxious moment into a colorless American business purgatory. Here, Pereira is said to have copied an existing office: the corporate headquarters of Paramount Pictures in New York City.
Wilder also decked Stanwyck out in the blonde wig "to complement her anklet ... and to make her look as sleazy as possible." This wig has been cited by some as being the picture's biggest flaw claiming that it looks too "fake". According to Wilder, this was exactly what he was going for when he chose the wig wanting to project, "the phoniness of the girl – Bad taste, phony wig", with cheap perfume to match. Unconvinced, Paramount production he
Double Indemnity (film)