That interested me after watching the movie too. They are real, though not from a "book" as such although the type of death focus is a major trend in 18th/19th century literature. People used to have death photos to remember their loved ones, a sort of commemorative thing taken on death. Its a type of photography which come under a trend called 'memento mori'...
Heres what I found:
Memento mori is a Latin phrase that means "Remember that you must die." It names a genre of artistic creations that vary widely from one another, but which all share the same purpose, which is to remind people of their own mortality....
...The artistic genre of still life was formerly called vanitas, Latin for "vanity", because it was thought appropriate for each such painting to include some kind of symbol of mortality in each picture; these could be obvious ones like skulls, or subtler ones, like a flower losing its petals. After the invention of photography, many people had photographs taken of recently dead family members; given the technical limitations of daguerreotype photography, this was one way to get the portrait subject to sit still.
theres a site on the particular memento mori in american photography of the 19th century here:
http://www.cmp.ucr.edu/terminals/memento_mori/default.html
other sites which may be of interest...
has a few pics:
http://users.chariot.net.au/~rjnoye/Misc/Postmort.htm
interesting encyclopedia article (where I got definition from):
http://en.wikipedia.org/wiki/Memento_mori
hope that helped, I only had a quick look... theres probably heaps more stuff around like it. Its an interesting thing that seems quite odd from our perspective, because we are so removed from the age where death and mortality was a frequent reality, and we are so used to photography and new technology and our culture has been so 'removed' from the reality of death, sanitised if you like, for so long. (Which brings me to another interesting point which I will post another thread on maybe.) But in those days I guess it was quite reasonable to take a photo to 'remember' someone by before they were gone forever, when photography was such a novelty...it was a very special thing to have the opportunity to capture their last (or probably one of few or only) image. (previously, think that only the wealthy could afford to have portraits made...) A photograph was a nice memento...