I did some orchestration for him a few years ago, and the way he worked was amazing. He'd look at the scene, ask for a click that hit a couple or three things, and then start playing. And he wouldn't look at the picture, but he'd hit the cues or get very close - i.e. the scene would be playing in his mind while he played.
Except that he wasn't just playing, he was really writing in real time. He'd make a few more passes over the cue - which he remembered completely from beginning to end - and then when it was done, hand it off to an orchestrator to take down and possibly tweak.
The next day he still remembered every note. Yeah, composers build up a vocabulary, but this was much more than that.