The director of Trainspotting, Danny Boyle, has explained why he stepped away from the James Bond film last year.

Boyle, who is appearing at this year's Edinburgh International Film Festival, has said a film’s writers are as important as its leading stars.

The director, 62, was due to direct the next James Bond film, currently titled Bond 25, but announced his departure from the project last year, citing “creative differences”.

He told Radio Times: “I’m very script-driven.

"Writers are as important as the star of the film for me.

"And John (Hodge, his longtime collaborator) was doing a wonderful job. But the producers wanted to go in a different direction.

“It’s silly continuing on something like that – so complex and so huge, it would just cause unhappiness.

"So I wasn’t prepared to continue without John.”

Born in Lancashire in 1956, Boyle made the Edinburgh-set Shallow Grave, in 1994.

This led to the adaptation of Irvine Welsh’s novel Trainspotting.

He has seen made The Beach (2000), 28 Days Later (2002), Sunshine (2007), Slumdog Millionaire (2008), 127 Hours (2010) and T2 Trainspotting in 2017.

American director Cary Joji Fukunaga was announced as the new director of Bond 25, which Daniel Craig has also said will be his last turn as the spy.

Boyle also recently said he thinks the actor Robert Pattinson would be a good person to take over from Craig in the main role.

Boyle has been promoting his latest film, Yesterday.