The highest criminal court in Texas reversed a state law this week that prevented people from taking pictures up women's skirts in public.

The law, which banned "improper photography or visual recording," with the "intent to arouse or gratify the sexual desire of any person," was deemed an unconstitutional violation of First Amendment rights to free speech and individual thought.

The act of secretly capturing lurid photography, usually aimed up women's skirts, is commonly known as "upskirting," and the photos are sometimes called "creepshots." Whatever the term used to describe it, the practice is now legal in the Lone Star State after an 8-1 ruling by the Texas Court of Criminal Appeals.

The case that prompted the repeal of the law involved Ronald Thompson, a man in his mid-50s, who was accused in 2011 of snapping pictures of small children in their swimsuits underwater, without parental permission, at a San Antonio Water Park. Thompson reportedly tried to delete the photos from his camera before it was seized by police, who subsequently charged him with 26 counts of "improper photography."

The San Antonio-based 4th Court of Appeals had previously struck down Thompson's conviction, and the Court of Criminal Appeals ruling upheld the decision.

In penning the decision, Presiding Judge Sharon Keller, opined: "The camera is essentially the photographer's pen and paintbrush. … A person's purposeful creation of photographs and visual recordings is entitled to the same First Amendment protection as the photographs and visual recordings themselves."

But how far is too far when it comes to self-expression? And does doing something unlawful trump someone's rights to First Amendment protection? These were the thorny questions the Bexar County District Attorney's Office raised in its arguments, according to the Houston Chronicle, but they ultimately failed to sway the judges.

The Court of Criminal Appeals said that while so-called "upskirting" is intolerable, nefarious intent cannot be proven, and even attempting to police it could lead to Orwellian overreach.

"Protecting someone who appears in public from being the object of sexual thoughts seems to be the sort of 'paternalistic interest in regulating the defendant's mind' that the First Amendment was designed to guard against," Keller wrote.

Thompson and his lawyers agreed, arguing that a "plain reading" of the Texas statute could put even the "street photographer, the entertainment reporter, patrons of the arts, attendees to a parade or a pep-rally, [and] even the harmless eccentric," at risk of incarceration.

The ruling does not affect creepy activities outside the public domain. It is still illegal in Texas to take photos of someone in private without their consent, such as in a bathroom or private dressing room-setting. Using X-ray cameras without consent is also still a no-no.

The court's ruling will likely impact 15 cases of inappropriate photography already currently under review in the Harris County Court and open the possibility for defendants to appeal at least 136 other cases that were resolved over the past 13 years.

Follow Liz Fields on Twitter: @lianzifields