I wish to overlay one CGImage over another.
As an example the first CGImage is 1024×768 and want to overlay a second 100×100 CGImage at a given location.
I have seen how to do this using NSImage but don’t really want to convert my CGImages to NSImage’s then do overlay then convert the result back to CGImage. I have also seen iOS versions of the code, but unsure how to go about it on Mac?
I’m mostly used to iOS, so I might be out of my depth here, but assuming you have a graphics context (sized like the larger of the two images), can’t you just draw the two CGImages on top of each other?
And then draw the result into a NSImage?