The typical library experience is changing thanks to digital technology, reports Ian Hardy from New York.
Digitising written and photographic works in libraries is not new. The Library of Congress has been doing it for more than 10 years.
Stacks of books are now only one aspect of what a library can offer
But after a few failed attempts in the late 1990s to distribute digital books, including a less than successful tryout by Stephen King, there is now a fresh determination to bring the written word and technology closer together, for everybody's benefit.
For the first time in its history, the New York Public Library (NYPL) this year served more visitors online than it did at its physical locations: 20 million compared to 15 million readers.
Some people might jump to the conclusion that the library building as we know it might soon come to an end. But they would be very wrong, says Paul LeClerc, NYPL's president.
"At the same time we've not seen a fall off of readership in our reading rooms or a diminution of visits to the library as a physical place.
"But we are seeing ever increasing uses of the library, through the internet, at a pace that is going to be growing very substantially in the future."
Far from shying away from today's technology, libraries have used it to become more attractive to a younger demographic.
Most have installed fast, free internet access, which draws in low income and minority visitors.
Despite a shaky start for e-books, there are now 4,000 titles at NYPL
For those who do have broadband access from home, libraries have found new audiences via third-party services aimed at the increasing the number of gadget owners.
Steve Potash, from the digital book vendor Overdrive, explains: "A patron would download an e-book. They typically have 21 days.
"During that period it's prohibited to file-share it. If they try to e-mail the file to a friend, the friend will not have the ability to open the file.
"And also, after the 21-day period, the technology automatically locks the book and resets it in the library's collection."
Overdrive has joined up with scores of library system across America to supply digitized books in various formats.
There are 3,000 audio books and 4,000 e-books available in the NYPL system.
Anyone with a library card can access the digital books, and it makes late fees a thing of the past.
This kind of service has been tried for years, but until recently there were not enough portable audio players or cell phones in use that were enabled with DRM (Digital Rights Management).
It is only now, after watching the music business go through its ups and downs, that publishers feel comfortable releasing their works into an online environment.
This year, NYPL served more visitors online than in physical locations
Some admit to being overcautious, including Patrick Durando, director of media technology at McGraw-Hill publishers.
He told Click Online: "I think publishing in general has spent too much and worried too much about illegitimate use.
"In creating DRM that protects its content, they may have gone overboard trying to prevent a scenario like the music industry.
"So we're trying to strike a fine balance between revenue and protecting our assets."
Libraries have kept themselves relevant by leading the way in digital preservation, and they already have the cataloguing skills to build navigable archives.
The New York Public Library now has 500,000 images and photographs online.
They are currently scanned as large Tiff files. The hope is that this file format will be the most detailed and the most adaptable in decades to come when technology moves on.
New file formats of the future give any digital object of today a limited lifespan, said Barbara Taranto, director of the Digital Library Program at NYPL.
"It's really not a matter of will it expire, but when it does expire, what are we going to do about it?
"So we have put into place systems that will migrate the information into the newest format without loss of information.
"That's basically the preservation strategy. No-one expects that any single format will continue for a long period of time."
But it is not only libraries that have realised the potential of huge digital collections.
Google's move to scan all works has been met with criticism
The large-scale scanning of written works has now also become a major priority for companies like Microsoft, Yahoo and Google.
The future of online books might one day rest with global one-stop portals.
At first Google scanned items in the public domain and teamed up with some of the world's most important libraries to do it. But some say it has overstepped the mark, which has prompted copyright lawsuits, including one from The Authors Guild.
"Unfortunately Google has gone a step further with certain of the libraries, including the University of Michigan and apparently Stanford and Harvard, where they intend to digitise not only public domain works but works that are still protected by copyright", said Paul Aiken, executive director of The Authors Guild.
"In doing this we see them creating an enormous database of copyrighted works, which they will make commercial use of."
There are several key differences between the world of books and music which might point to a more successful outcome for the written word in a digital age.
Today's devices are more secure and the content is more difficult to copy than even a couple of years ago; the public is now more wary of file swapping in countries where music fans have been sued; and the legitimate download industry is growing and offering services that people actually want.
Click Online is broadcast on BBC News 24: Saturday at 2030, Sunday at 0430 and 1630, and on Monday at 0030. It can be watched on the website from Friday evening. A short version is also shown on BBC Two and BBC News 24 as part of BBC Breakfast: Saturday at 0645. Also BBC World.