A Dunedin man who sent a topless photo of a woman to her ex-partner has been locked up for six months.