Creating an image badge with Cocoa/OSX

badge, cocoa, macos, nsimage

Solution

Draw a third image by compositing the two. It's pretty straight forward if you give the drawing documentation a read. Particularly the Images section.

Problem

I need to create an image badge in Cocoa. Basically I need to take two images one smaller then the other and overlay the smaller image over the larger image with a certain offset. Does Cocoa provide any utility to make this sort of thing easier?

Original source