Case dismissed against Brooklyn man who put nude photos of ex on Twitter.

A Manhattan judge dismissed criminal charges Tuesday against a man who shared naked photos of his girlfriend on his Twitter account and also sent the nudes to her sister and employer.

“The Court concludes that defendant's conduct, while reprehensible, does not violate any of the criminal statutes under which he is charged,” Criminal Court Judge Steven Statsinger wrote in a decision published Wednesday.

Ian Barber, 29, of Bedford-Stuyvesant, Brooklyn uploaded the naughty images of his ex in July 2013. He was slapped with three counts: aggravated harassment, dissemination of unlawful surveillance and public display of offensive sexual material, all misdemeanors.

A detective said the woman told him she never gave Barber permission and that the defendant claimed, in turn, that she did.

The judge concluded that even if there was no permission, current laws are insufficient to sustain the allegations.

Harassment entails sending communications to the victim, which Barber didn't do; unlawful surveillance requires that the images be obtained illegally, which wasn't alleged; and nudity alone does not equal offensive sexual material, a count that also requires public display, which doesn't include a subscription service like Twitter, the judge found.

Statsinger noted that “This case appears to the first in which a New York court has considered criminal charges stemming from what has come to be known as ‘revenge porn.’”

Only two states - New Jersey and California - have laws directly addressing the practice of sharing sexually explicit media without consent from the pictured person. "Revenge porn" is typically a way to get back at an ex who spurned the uploader.

The court document did not specify why Barber sent out the images. His lawyer didn't comment.