Directed by Garth Jennings ; written by Douglas Adams and Karey Kirkpatrick , based on the book by Mr. Adams ; director of photography , Igor Jadue-Lillo ; edited by Niven Howie ; music by Joby Talbot ; production designer , Joel Collins ; produced by Gary Barber , Roger Birnbaum , Nick Goldsmith , Jay Roach and Jonathan Glickman ; released by Touchstone Pictures and Spyglass Entertainment .