Thanks for the comment, Cabbynum. For me it must be Tchaikovsky's final movement of the 6Th symphony!
Anyway in my case the music was written independently from the photos, and this is perhaps why awesom_o couldn't see the connection. I recently started a channel on youtube and thought that it might help if I adapt to the "visuality" of it. I can't say I felt the need to do that.
As for how to write music, inspiration can come different ways, and certainly a photo or a film it is one. This can give the spark for the initial idea of a composition. After that there is a loft of craftmanship involved. Some of morricone's music reaches the highest quality even if it has been written to accompany a movie.