views:

390

answers:

0

Hi,

I have a CGImageRef that is lets say 35x35. I'm using it and a mask to create another image, but the mask is 50x50.

CGImageRef subImage = CGImageCreateWithImageInRect(imageRef, CGRectMake(x, y, 35, 35));
CGImageRef xMaskedImage = CGImageCreateWithMask(subImage, mask);

Apparently this stretches the subImage out to be 50x50, but what I want is for it to just draw either black or white space in the areas it doesnt fill. So basically how do I resize the subImage to 50x50 without having it scale/stretch?