A judge's ruling could make it quite hard for book authors to sue over what they perceive to be unlicensed film adaptations.

Sony Pictures has won a lawsuit brought by writer Joe Quirk, who alleged that the studio had breached an implied contract by allegedly stealing his 1998 novel to create Premium Rush, which stars Joseph Gordon-Levitt and grossed $20 million domestically when it was released last August.

On Tuesday, U.S. District Judge Richard Seeborg granted Sony's summary judgment motion and offered a provocative opinion that likely will become well-chewed by copyright scholars and will come as a blow to many authors. What happens when a book author sells film rights to his work to one major studio and then years later, after the option has expired, a second studio comes up with a suspiciously similar -- but maybe not substantially similar -- treatment?

On Tuesday, a federal judge in San Francisco delivered an answer. Here's the full ruling.

'Q&A: 'Premium Rush's' Joseph Gordon-Levitt, Dania Ramirez on Stunts, Stitches and Shooting in New York

Although stolen idea lawsuits are common, this one had a better chance than most for two big reasons.

First, because Quirk actually had a respectable agent in the business -- CAA's Matthew Snyder, who distributed pre-release copies of Quirk's 1998 novel, The Ultimate Rush. An option on the book was purchased by Warner Bros., which commissioned two separate writers to prepare a screenplay but never went forward with a film. Quirk at least had a basis for theorizing that Sony's Columbia Pictures unit had seen either his book or Warners' screenplays even if he couldn't directly prove it.

Second, because rather than bring a copyright infringement lawsuit, Quirk attempted a tougher-to-defeat claim of breach of implied contract. In a ruling last year, before Premium Rush was released, the judge denied Sony's motion to dismiss, saying Quirk would need to prove "not only that a copy of the novel originally provided by his agent ended up in the [producers'] hands but also that each person who accepted it along the way did so with the expectation that payment would be due if the ideas were utilized."

But now Sony has won the lawsuit on a slightly different ground.

"Quirk offers the expert declaration of Bruce Gelfand to explain the nature and extent of changes that screenwriters often make when adapting an underlying novel into a movie, and to provide an option that Premium Rush bears the hallmarks of having been created from Ultimate Rush through an entirely typical process of adaptation," writes Judge Seeborg. "The fundamental flaw in Quirk's analysis is that he effectively assumes he has a viable claim in copyright and/or under Desny as long as he can prove the movie is an 'adaptation' of the novel in the sense described by Gelfand."

But the judge said that figuring out whether Premium Rush was an adaptation of The Ultimate Rush was the wrong inquiry. The judge said that might bear on "willfulness" -- which would pertain to statutory damages if there was found to be liability on Sony's part -- but it doesn't address what the judge said was the "threshold question," which he defined as deciding "whether the end product of the Premium Rush movie is 'substantially similar' to Quirk's novel, as that term is used in copyright law."

VIDEO: 'Premium Rush' Trailer: Joseph Gordon-Levitt Races Through Streets of New York With Mysterious Envelope

This ruling could make it quite hard for book authors to sue over what they perceive to be unlicensed film adaptations.

Judge Seeborg says, "Even assuming Gelfand is factually correct that Premium Rush was 'adapted' from Quirk's novel in exactly the manner he believes occurred, and even assuming that the features he identifies as similarities are evidence of such an adaptation process, it simply does not automatically follow that there is liability under copyright law (or even under Desny)."

(Desny refers to implied-in-fact contracts claims.)

The judge eventually got around to analyzing whether there was substantial similarity between Premium Rush, about an adventurous bike messenger being chased by a corrupt police officer, and Quirk's novel, about a Rollerblading messenger wrongly suspected of murdering a fellow messenger and pursued by members of a criminal enterprise.

He wasn't impressed. "The two works differ greatly in many large and small details as well as in their overall mood, style and structure," says the judge.

And as for the claim there was an implied contract between Sony and Quirk, the judge says, "Even assuming a reasonable fact finder could conclude that commonalities among elements found in the novel, the movie and the intervening scripts demonstrate that Premium Rush was created by a process of adaptation from Ultimate Rush, Quirk still lacks evidence that defendants utilized any of his ideas under circumstances giving rise to 'bilateral expectation of payment.'"

Perhaps even more intriguing was another issue the judge raised. Someone who blurts out an idea in public can't have any expectation of bargaining for payment of that idea. The judge said that an author who widely publishes a book is similar to a man who blurts out an idea.

Judge Seeborg concludes, "Quirk elected to disclose the ideas in his novel to the entire world without any conditions, other than those arising from copyright law, on the ability of persons to make whatever use of the ideas in the novel they wished. He cannot now claim defendants were nevertheless impliedly bound to pay for using the ideas, regardless of the precise circumstances under which they were exposed to the novel (if they were) years later."

Email: eriq.gardner@thr.com; Twitter: @eriqgardner