i want to merge multiple images ina single image,by using a button click>my problem is ,,if the user touch a ima开发者_如何学Goge in tableview ,the coresponding image have to merge with the main image in the next page..how can we done this?
this is the main image in the page!this the the uppercloth
i have to fix the upper cloth in the caricature
Use UIGraphicsBeginImageContext, then call drawAtPoint method of the images, then use UIGraphicsGetImageFromCurrentImageContext to get the merged image. Something like this(Not checked, just wrote from memory..Syntax errors possible..Correct yourselves..)
UIGraphicsBeginImageContext(yourFirstImage.size);
[yourFirstImage drawAtPoint:CGPointMake(0,0)];
[yourSecondImage drawAtPoint:CGPointMake(0,0)];
UIImage *mergedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
精彩评论