If I borrowed from a library and kept a complete scan of the book when returning it, copyright law would still apply. Libraries as far as I know do not have the right to authorise  third parties to copy entirities of others work.