views:

1721

answers:

2

Hi,

How can we combine two images means i have two images and one small and another is big one. i want to combine small image into big one image at a specific CGPoint and i need object of UIImage. I have tried with CGCreateImageFromMask like that thats spread small image to whole portion of big image.

Plsssss anyone help me.....

Thanks.

+3  A: 

You'll want to use UIGraphicsBeginImageContext() to generate a CGContextRef, then use UIGraphicsGetCurrentContext() to get a reference to it. Now draw your current images into the context. When you're done, use UIGraphicsGetImageFromCurrentContext() to generate an UIImage from that context, and UIGraphicsEndImageContext() to clean up.

See Apple's UIKit Function Reference doc.

Ben Gottlieb
A: 

Have a look at this question stitch-picture-in-iphone

Dan