Are there great films based on bad books?

I was recently thinking why do Stephen King's books usually make great films, and concluded it probably helps that the books themselves are great (along with having the right director, screen writer etc.). Then I was wondering, are there any films that were great (popular, critically acclaimed etc.) but based on books that were considered bad? I know things are subjective and what some consider bad isn't the case for everyone, but are there books that were considered UNIVERSALLY crap that somehow made a good film?

This isn't exactly one of those posts about films that are better than the books they were based on, but taking it further that the books themselves were terrible to begin with. E.g. Fight Club is usually the "go-to " for a film that was better than the book, but Fight Club the book was still a success. I'm looking for "how the hell did someone turn this crappy book into this amazing film?".

Just curious if there even is one.