McNaught, of Mount Vernon, Glasgow, is on trial at Hamilton Sheriff Court and faces a total of ten charges of placing Miss Galloway in a state of fear and alarm. He has denied all the claims against him.

Miss Galloway, of Uddingston, Lanarkshire, told a jury that McNaught, 54, e-mailed her in January 2012 and told her he planned to show the nude

photos at an art exhibition.

The couple were in a relationship for around six years. They split in 1996 and the photos were taken when Miss Galloway was pregnant with their son James, now 22.

In e-mails shown to the court, McNaught wrote: “I have photos of you, a couple of naked pregnant shots, which I am happy to copy and hand back – it could be your page 3 moment.

“There is, if not money, artistic capital in plenty to be had from seeing them beautifully framed and hung.”

Under questioning from depute fiscal Imran Bashir, Miss Galloway said: “This was him reminding me he had lots of personal memorabilia and photos of me when I was pregnant.

“A number of e-mails followed about him using these in some way.

“He was saying, ‘I have photos of you with no clothes on and I will show them’. He was saying that if I didn’t get in touch with him, it would be a way of saying ‘Go ahead and do this’.

“He said he had been in contact with the Gallery of Modern Art who had offered him exhibition space. He was warning me that he could show me in a bad light in a public gallery.

“Have you heard of ‘revenge porn’ where ex-boyfriends post pictures of women who they have had relationships with on the internet? It felt like an early version of that.

“It was an utter dismissal, that my attachment to him over the years had any meaning at all, and it felt lousy. It was hellish.”

Miss Galloway and McNaught met in 1990 and had an on-off relationship.

The trial had earlier heard Miss Galloway claim her “blood ran cold” when she received letters from McNaught.

Giving evidence from behind protective screens, she said she had received “bizarre” letters and parcels with drawings and paintings from McNaught since they broke up in 1996.

She said she called police in January 2012 after finding a suspicious package in her kitchen.

Miss Galloway broke down in tears as she told the jury about her fears that McNaught was going to destroy her career.

She claimed he launched a campaign to damage her reputation and harm sales of her books.

The trial had earlier heard claims McNaught turned up uninvited at Miss Galloway’s home and said he was to be crowned the king of Scotland at a beachfront ceremony.

He is alleged to have told Miss Galloway – author of titles including The Trick is to Keep Breathing, Foreign Parts and Blood – that he was to “walk into the water” and wanted to take the couple’s son with him.