Three photos showed the victim's exposed breasts, and four showed her in her underwear, Mr Butler said.
The victim is not looking at the camera in the photos. The photos are stored on Lang's laptop and cellphone.
He said he "wanted to return them to her and wanted closure for himself", Mr Butler said.
Judge Thomas Ingram sentenced Lang to 12 months imprisonment in total.
Where to get help:
• In an emergency: call 111
• Lifeline: 0800 543 354 (available 24/7)
• Suicide Crisis Helpline: 0508 828 865 (0508 TAUTOKO) (available 24/7)
• Youthline: 0800 376 633, or text 234 (available 24/7) or talk@youthline.co.nz or live chat (between 7pm and 11pm) http://livechat.youthline.co.nz/mibew/chat?locale=en&style=youthline
• Kidsline: 0800 543 754 (available 24/7)
• Whatsup: 0800 942 8787 (1pm to 11pm)
• Depression helpline: 0800 111 757 (available 24/7)
• Rainbow Youth: (09) 376 4155 (weekdays 11am to 5pm)
• NetSafe: 0508 NETSAFE (0508 638 723), www.theorb.org.nz