HOUSTON, Texas — Texas’ highest criminal court threw out a law on Wednesday banning “improper photography in public.” Banning such photography, which includes “upskirting” or “downblousing” for the purpose of sexual gratification, would be considered a violation of free speech.

The Texas Criminal Court of Appeals ruled 8-1 that photos are protected by the First Amendment and “inherently expressive,” according to the Houston Chronicle.

The decision followed a 2011 case that involved a man taking photos at SeaWorld of children in their bathing suits. After being charged with 26 counts of improper photography, the man appealed and argued that laws banning photography threatens the First Amendment of everyone including legitimate expressive artists.

Presiding Judge Sharon Keller reportedly said in the majority opinion, “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.”

Keller continued, “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.

Those who oppose the courts ruling complain that it does little to protect victims. Others assert that the ruling obstructs officials’ ability to track predators using “red flags.”

Assistant District Attorney of Bexar County, Cliff Hergerg, told KHOU, “Typically the people that are getting caught up in this law are people that are in the process of moving through stages of becoming a pedophile. Usually when an officer stops that individual by the time they get through that camera, they usually find child pornography or when an officer gets a warrant and goes to their home they find child pornography on their computer.”

According to the Chronicle, inappropriate photography cases are fairly common in Harris County, which Houston is situated; at least 15 such cases are currently pending and could be affected by the court’s new ruling.

Despite the recent decision, it is still against Texas law to take photos in bathrooms or dressing rooms.

Follow Kristin Tate @KristinBTate.