Director Roman Polanski is finishing work on his latest film from a Swiss jail where he is fighting extradition to the United States on a 1977 sex charge, according to writer Robert Harris, a friend of Mr Polanski.
Mr Harris, who wrote the screenplay for the movie, The Ghost, told the London Timesnewspaper that Mr Polanski wanted to finish the movie in time for its planned premiere at the Berlin film festival in February.
"He (Polanski) can make his wishes known from his cell. I don't think he can make phone calls, but he can communicate," Mr Harris told the Times.
"What people think of the film is another matter. Whether the film can rise above the circumstances in which the director now finds himself I don't know. We will test to the upper limits the notion that there's no such thing as bad publicity," he added.
Polanski (76) was arrested in Zurich last month on a US arrest warrant. He is wanted in Los Angeles to face sentencing on a 1977 charge of having unlawful sex with a 13 year-old girl. The Chinatowndirector fled California in 1978, fearing he would be sentenced to 50 years in prison, and has lived mostly in France ever since.
Polanski's lawyers have said he will challenge extradition, which could drag out an already complex process for years.
Mr Harris, who wrote the book on which The Ghostis based, said Polanski had finished editing the movie on the day of his arrest. It stars Pierce Brosnan in a tale about a British prime minister accused of war crimes.
Mr Harris said Polanski had recently given instructions about the film score and was making other decisions from his cell.
"It is a nightmare looming that the director might be in jail at the time (of the film's release) but we will just have to cope with this as the situation develops. I'm sure he would want the film to go ahead, having worked on it for two years."
Polanski's other movies include Rosemary's Babyand the 2002 Holocaust drama, The Pianist, for which he won a best director Oscar that he didn't travel to Los Angeles to collect.