开发者

iphone image merging

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?

iphone image merging

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜