As Prince William and his wife Kate return to Britain this weekend they would normally be reflecting on a job well done.
The royal couple's first visit to the Asia-Pacific region - a whirlwind nine-day tour of Singapore, Malaysia, the Solomon Islands and Tuvalu - appeared to go off without a hitch.
They were carried on thrones in Tuvalu, where William danced in a grass skirt. Kate dazzled photographers with two and sometimes three outfits a day, briefly creating the illusion of a royal tour as it should be.
But as they were greeted by bare-breasted tribal women in the Solomon Islands, the headline writers couldn't resist. "How are you baring up, Your Highness?" asked Melbourne's Herald Sun.
Unfortunately for the likely future king and queen, the entire tour was overshadowed by grainy topless pictures of 30-year-old Kate, snapped by a celebrity photographer as the couple sunbathed on the roof of a secluded chateau in the south of France, days before the trip began.
Publication of the photos - which showed Kate sometimes without her bikini top and, in one case, her bikini bottom partially pulled down to apply sunscreen - coincided with the start of the tour, causing embarrassment for Kate and stony-faced anger for several days from William.
It was also a public relations nightmare for the royal minders, who invoked the British wartime spirit as they described the couple's response as "keep calm and carry on".
That became the only possible strategy as traditionally popular photo opportunities, such as William and Kate showing off their dance moves in Tuvalu, lost the internet war with the unauthorised topless pictures, which did not appear in British papers but spread like wildfire elsewhere.
Meanwhile, news of the royal visit itself was overshadowed by the royal family's dramatic legal bid to shut down any further publication of the images, thought to have been taken by a British photographer based in France.
On Tuesday a French court ordered the French gossip magazine Closer, the magazine that first published the photos last week, to turn over all digital copies of photos of the duchess and not to print them again.
However, the ruling applied only to Closer in France - not to the Irish Daily Star, which had also published photos, or the Italian magazine, Chi, which published a 26-page photo spread this week, or to Sweden's Se & Hoer celebrity magazine, which ran the photos and followed up with a 16-page spread in its sister publication in Denmark.
Se & Hoer's editor denied that the photos were an invasion of privacy for the couple.
"It is nothing new to us to publish nude photos of celebrities on holiday," said Carina Lofkvist. "No one complains when they do and we print the photos."
Chi, like Closer, is published under the Mondadori publishing house owned by former Italian Prime Minister Silvio Berlusconi. Chi is also the same magazine that, in 1997, published photos of Princess Diana's dying in the Paris crash.
The editor of Chi also stood behind his decision to publish the photos, saying he did not fear legal action and writing on Twitter that "not even a direct call from the Queen" could stop him from publishing the photos.
The royal family has evoked the memory of Princess Diana, who died in 1997 at age 36 after a high-speed car chase with paparazzi in Paris, in its bid to block the photos and push for criminal charges against the unidentified photographer or photographers who took the photos.
The palace described the incident as "reminiscent of the worst excesses of the press and paparazzi during the life of Diana, Princess of Wales, and all the more upsetting to the Duke and Duchess for being so".
Although Closer magazine has argued that the couple were "visible from the street", the Daily Mail estimated the pictures must have been taken from half a mile away. A BBC photo showed the chateau as a distant building on a hill when viewed from the nearest vantage point on the road.
The French court agreed. "These snapshots, which showed the intimacy of a couple, partially naked on the terrace of a private home, surrounded by a park several hundred metres from a public road, and being able to legitimately assume that they are protected from passers-by, are by nature particularly intrusive," the ruling decreed. "[They] were thus subjected to this brutal display the moment the cover appeared."
Commentators described the couple's aggressive legal strategy over the topless photos as a likely first salvo in what could be a decades-long tug-of-war over their family's privacy.
While the wealthy royal couple did not gain much on paper - the court-imposed fine was about $2500 - legal experts and royal watchers say the action was designed to demonstrate their willingness to use all legal means to prevent future press intrusion.
That will become even more important when the couple have a child, who would become third in the line of succession to the British throne, said Joe Little, the managing editor of Majesty magazine.
"This was done because they want to set a benchmark for the future," he said. "They want to send a warning to anybody who might think of doing something similar in the future."
The fast legal intervention, which developed within hours of the publication of the photos Friday in a French gossip magazine, represents a break from Queen Elizabeth II's traditional policy of using legal action only as a means of last resort. It also reflects William's determination not to let the press harass Kate as it did his late mother, Princess Diana, Little said.
Still, the case shows the unlikelihood of controlling photos through legal means once they have been published.
The revealing pictures will follow Middleton for the rest of her life, not unlike the snapshots of her appearance in a charity fashion show wearing black lingerie and a sheer dress during her university days.
"Clearly, the harm has been done," said Christopher Mesnooh, an American lawyer working in France for Field Fisher Waterhouse. "Thousands, now tens of thousands, of copies are now in public circulation. A legal decision is a wonderful thing to obtain and the royal couple did exactly what they should have done. But you know the magazine is out there and I suspect most of you have already seen copies of that magazine, so the basic, the initial harm, has been done."
He said magazine executives had concluded in advance they had little to fear from an adverse court ruling when they decided to print the photographs, obtained by a photographer who trained a long lens on the royal couple as they sunbathed on a private estate in southern France.
"Closer magazine has done a very sophisticated cost-benefit analysis," Mesnooh said. "Whatever the amount of damages that a French court will award, it will be a fraction of the publicity that the magazine will have gained, as well as the number of issues of this particular issue of Closer magazine that will be sold."
The royal couple is also filing a criminal complaint against "X", the unnamed photographer who took the picture. The suit aims to flush out the mystery photographer's identity and prevent him or her from spreading the photos to new locations. If the case goes forward, the photographer could face a substantial fine and a one-year prison term.
But fines and prison terms won't remove the photos from the internet.
Professor Tim Luckhurst, head of the journalism department at the University of Kent, said the royal couple has likely learned some lessons from the debacle. "The prince and his wife are going to have to think hard about what sort of conduct is acceptable for the heir to the throne and his wife in the age of the internet."
US business mogul Donald Trump tweeted that Kate had only herself to blame for being silly enough to sunbathe in the nude, when she knew photographers would be stalking her every move.
"She's Kate," he told television show Fox and Friends. "It's terrible what they did, it's terrible to take pictures, but boy, how can you do a thing so stupid?"
- Staff reporter, agencies.