我有两个 ImageView,我正在合并两个图像。第一个图像是bodyImage,第二个图像是一个纹身图像。我已经完成了合并,但我想问
1)我可以将纹身图像拖到bodyImage上。我想在水龙头坐标上使用 doubleTap tattooImage mergeWith bodyImage。希望你理解问题
谢谢
+ =
这是我的代码:这里 imageView1 是我的 bodyImage 和 imageView2 是我的纹身图
- (void)tapDetected:(UITapGestureRecognizer *)tapRecognizer
{
int width=500;
int height=500;
NSLog(@"takephoto from twitter");
CGSize newSize = CGSizeMake(width, height);
UIGraphicsBeginImageContext( newSize );
// Use existing opacity as is
[imageView1.image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
// Apply supplied opacity if applicable
[imageView2.image drawInRect:CGRectMake(180,200,200,200) blendMode:kCGBlendModeDarken alpha:0.4];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
imageView1.image=newImage;
UIGraphicsEndImageContext();
}