The police thriller “Rampart” — premiering today in Toronto as one of the fest’s hottest sale items — is a study in contrasts: Not just in its stark high-contrast cinematography, but in the personality and interests of its makers.

Based on the novel by James Ellroy, the celebrated crime writer of “White Jazz” and “L.A. Confidential,” the film takes place in the author’s typical hardboiled masculine milieu; in this case, the LAPD’s Rampart corruption scandal, following a ruthless dirty cop played by Woody Harrelson.

But as it’s been adapted and directed by Oren Moverman, the sensitive indie screenwriter (“I’m Not There”) and director (“The Messenger”), the film version has gone from testosterone-fueled pulp to something more “interior,” according to Moverman.

“I’m not going to hide the fact that James and I don’t agree on a lot of things,” said Moverman, who was first hired to rewrite Ellroy’s crackling, though complicated script by Lightstream Pictures, producers of Moverman’s directorial debut “The Messenger.”

“But I think that tension is apparent in the movie,” continued the Israel-born filmmaker. “You’ll see the character’s behavior — his racism, his sexism, his homophobia — but I think the movie is directed in a way where it doesn’t celebrate him or justify him. It just presents the culture he’s in.”

Lightstream’s Lawrence Inglee had talks with other directors, but ultimately decided that Moverman and Ellroy, coming from “such different ends of the spectrum would … through some alchemy make a really compelling film.”

Inglee said “Rampart” also has some parallels with “The Messenger,” in that both films deal with the consequences of the actions of men in uniform, either in going to war in Iraq, or the streets of Los Angeles. Inglee further noted a connection to Moverman’s own past.

“Oren was interested in what it means to be a police officer in 1990s Los Angeles, when they were operating like occupying soldiers,” he said.

Moverman himself admitted he might not have been the most obvious choice to direct the project. He’s never lived in L.A., for one, and “never felt comfortable there.” But it was that alienation from Southern California that helped make “Rampart” distinct.

“Being an outsider informed everything,” he said.

Rather than the milky overcast skies that dominate most L.A.-set films, for example, Moverman and his cinematographer Bobby Bukowski, shooting on the Alexa digital camera, opted for a more “overwhelming” natural light, with “the sun exploding through blinds and curtains,” he said. “That’s kind of the language of the film.”

Making the film in Los Angeles, however, almost sabotaged the project altogether, according to Inglee, as they waited to receive a California tax credit. At the 11th hour, first-time investor, lawyer and “Rampart” producing partner Ken Kao — whose father co-founded GPS technology company Garmin Corp. — “made the decision to risk it even when the tax credit didn’t come through,” Inglee said. “After a few harrowing weeks, it finally did come through.”

For Moverman, shooting in the city of angels was essential.

“I lost my sunglasses when I first arrived in L.A. and I was squinting and feeling, ‘How can people function in this place?,'” he said, “and that really informed the script and the movie.”