The Fourth Court of Appeals of Texas said the law not only violated Ronald Thompson's "right to photograph," but also "restricts a person's thoughts," the San Antonio Express-News reported Wednesday.
Thompson was arrested in July 2011 after parents complained he was swimming with and photographing children ages 3 to 11, Bexar County District Attorney Susan D. Reed said in a statement.
As park security approached Thompson, he began deleting photos from the camera, the statement said.
Police found 73 photos on the camera of children in swimsuits, with most of the images "targeting the children's breast and buttocks areas."
Thompson was indicted on 26 felony counts of violating the Texas Improper Photography statute, which protects people from being photographed without their consent for sexual purposes.
Writing for the court, Justice Marialyn Barnard said there was "no careful delineation of criminal conduct" under the law, and that "anyone who takes photographs of non-consenting persons is at risk of violating the law."
The district attorney said she planned to appeal the ruling.
'SNL': 'Anchorman 2' cast, One Direction sing 'Afternoon Delight' [VIDEO]
Selena Gomez drops F-bomb, walks off stage during Jingle Ball performance