luyinghuai
在程序中如何把两张图片合成为一张图片   
- (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 {  
    UIGraphicsBeginImageContext(image1.size);  

    // Draw image1  
    [image1 drawInRect:CGRectMake(0, 0, image1.size.width, image1.size.height)];  

    // Draw image2  
    [image2 drawInRect:CGRectMake(0, 0, image2.size.width, image2.size.height)];  

    UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();  

    UIGraphicsEndImageContext();  

    return resultingImage;  
}

分类:

技术点:

相关文章:

  • 2022-01-01
  • 2021-11-21
  • 2021-09-11
  • 2021-11-19
  • 2021-05-28
  • 2021-06-26
  • 2022-01-02
猜你喜欢
  • 2021-12-17
  • 2022-02-22
  • 2021-06-19
  • 2021-06-06
  • 2022-02-09
  • 2022-01-02
相关资源
相似解决方案