A Windham man now serving a 32-year prison sentence for sexually abusing a 4-year-old girl and photographing the assaults lost his bid on Tuesday to overturn his conviction.

Nicholas Gladu, 30, had appealed his conviction after a 2012 trial on charges of unlawful sexual contact, sexual exploitation of a minor younger than 12, visual sexual aggression against a child, and 65 counts of possessing sexually explicit materials.

Gladu contended in his appeal that a photograph introduced at trial was insufficient to convict him of unlawful sexual contact, that the trial judge should have acquitted him on that count, and that the jurors were not sufficiently vetted during the jury selection process to see whether they had biases against people with mental illness.

Gladu had pleaded not guilty by reason of insanity.

The Maine Supreme Judicial Court unanimously denied that appeal in an opinion issued Tuesday, rejecting Gladu’s claims.

Authorities began investigating Gladu in 2010 after his ex-girlfriend found a memory card for a camera in the pocket of his coat while she was packing her belongings to move from her apartment and found sexually explicit images with children on the card, according to court records.

Gladu’s sentence includes 18 years of probation. The conditions include no contact with children younger than 16, a prohibition on sexually explicit material, and sex offender evaluation and counseling. He is required to register as a sex offender for life.

Scott Dolan can be contacted at 791-6304 or at:sdolan@pressherald.comTwitter: @scottddolan