A 41-year-old man will be sentenced tomorrow for the harassment of RTÉ newsreader and journalist Sharon Ní Bheoláin.
Conor O'Hora, from Heather Walk in Portmarnock in Dublin, pleaded guilty to the charge and to three counts of possessing child abuse material.
He was remanded in custody.
The court heard O'Hora harassed Ms Ní Bheoláin between March 2013 and January 2014, by posting pictures on a website of her face superimposed onto pornographic images.
Judge Martin Nolan said this was an unusual but insidious type of harassment and it must have caused great distress and trauma to Ms Ní Bheoláin and her family.
The court heard images of Ms Ní Bheoláin from magazine and newspaper articles had been used and modified to create the pornographic pictures.
O'Hora then uploaded them on to a website.
The account was closed at the request of gardaí in January 2014.
O'Hora's home was searched in February 2014 after a complaint was made by Ms Ní Bheoláin.
Gardaí seized a computer and mobile phone, which led to him being charged with offences relating to child abuse material, as well as the harassment charge.
Two of the offences related to images found on his computer and on his iPhone.
In all, 97 images were found. Most of them involved young children and were in the most serious category of images.
The majority were pictures of the young child of a person O'Hora knew. These images had been taken from the person's family Facebook page, the court heard, and then doctored to make them into explicit pictures.
The final offence involved conversations via Yahoo private messaging with another man.
Detective Garda Padraic Hanley of the Garda National Bureau of Crime Investigation told the court these were extremely sexually explicit conversations.
There were more than 30 conversations. Some referred to Ms Ní Bheoláin.
Others referred to the child of the person O'Hora knew and to two other young children.
They contained threats and discussions about extreme sexual violence, torture and abduction, as well as the exchange of some of the doctored images.
The court heard O'Hora had fully co-operated with gardaí.
He told gardaí he had no malice towards Ms Ní Bheoláin and did not wish her any harm. He said the photos and conversations were just "really bad fantasies".
He admitted to gardaí that what he was doing was unhealthy and he was "not on a good path".
The court heard he was smoking 12-15 joints of cannabis a day, as well as drinking and taking cocaine when he could afford it.
He said he lived with his parents and was spending up to 18 hours a day in his bedroom. He later told gardaí he had a "seriously sick mind at the time".
The court heard he was no longer taking drugs and was engaged in a therapeutic programme where he had made good progress and was judged to be at a low risk of re-offending.
His defence counsel, Pieter LeVert, handed in testimonials on his behalf to the court, as well as apologies to Ms Ní Bheoláin and the children involved in the case.
Mr LeVert said O'Hora had repeatedly expressed remorse and had an extremely supportive family. He urged the judge to deal with him as leniently as he could.
Judge Martin Nolan said he would impose a custodial sentence but would consider the length of the sentence overnight.
He said O'Hora must have known the distress and trauma his actions would cause to Ms Ní Bheoláin and what he did was reprehensible.
He said the fact that one of the children involved in the other charges was the child of someone he knew was an aggravating factor and that O'Hora should be thoroughly ashamed of himself.
The text conversations, the judge said, were sordid and pretty disgusting. He said there were mitigating factors and he accepted O'Hora was at low risk of reoffending.
However, he said this was serious offending and a custodial sentence was inevitable. He remanded O'Hora in custody overnight and will sentence him tomorrow.
The court heard the other man in the text conversations has already received an 18-month suspended sentence, which is under appeal for being unduly lenient.