Sick Stanley Gibbs, 35, set up devices to film his female friend - who trusted him like family - in her Glasgow flat without her knowing.
He then uploaded various pictures, including naked photos of her getting out of the shower, on to the internet.
Using the username “Psycho Stan” he wrote that he got “sexual gratification” from the pictures and that she had no idea she was being filmed.
But, he was snared when a concerned friend of the girl spotted the pictures on the internet.
Gibbs, from Erskine, pled guilty at Glasgow Sheriff Court to using electronic devices to record the female in a state of undress.
He also admitted uploading indecent footage of her on to the internet and recording her without her knowledge between October 2012 and June 2014.
Yesterday sheriff Andrew Mackie jailed Gibbs for 12 months, reduced from 18 because of his guilty plea.
He told Gibbs: “Your behaviour as you know was deplorable and appalling.
“It was a gross breach of trust and it was a gross invasion of your victim.” The sheriff also put Gibbs on the Sex Offenders’ register for 10 years and granted a non-harassment order for the same length of time.
The court heard Gibbs and the female had been friends for a number of years and that he regularly visited the flat where she stayed.
In June, last year, a friend of the woman was online when they came across various pictures and recognised her from them.
Procurator fiscal depute Claire Whyte said there was a number of still images that showed the female in a state of undress.
She said “Perhaps in the process of getting changed.” She added that there was also pictures showing the female “getting out of the bath and shower”.
Knowing that the victim - who cannot be identified for legal reasons - was uncomfortable with having her picture taken, her friend thought it would be “out of character” to allow pictures of this nature to be online.
The person who uploaded the images used the name “Psycho Stan” and claimed that the girl was unaware they had been taken.
The friend saved everything that they found on to a USB stick and contacted the girl to advise her she should leave her flat.
The police were then alerted and a search warrant was granted for Gibbs’ house.
Miss Whyte told the court that when officers arrived Gibbs said “Whatever you need I will give you”.
He was detained and interviewed by police before being cautioned and charged.
Electronic equipment was seized including a laptop, hard drive, mobile phone and tablet, as well as a digital camera.
They were analysed and 60,000 moving images found which were taken “covertly”.
The court heard much of the footage was of “day to day” business, as well as indecent footage captured.
It was heard that the girl was “shocked and disgusted” and that "she trusted the accused like family.
Defence lawyer Neil McCulloch said his client has shown genuine remorse for his victim.
He said Gibbs accepts his crimes were “unacceptable and inexcusable”.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article