gpt4 book ai didi

ios - iphone 图像合并

转载 作者:行者123 更新时间:2023-11-29 13:49:00 25 4
gpt4 key购买 nike

我想通过单击按钮将多个图像合并到一个图像中>我的问题是,如果用户在 tableview 中触摸图像,则对应的图像必须与下一页中的主图像合并..如何我们能做到吗? enter image description here

这是页面中的主要图像! this the the uppercloth

我得把漫画里的上布修好

最佳答案

使用UIGraphicsBeginImageContext,然后调用图像的drawAtPoint方法,然后使用UIGraphicsGetImageFromCurrentImageContext获取合并后的图像。类似这样的东西(没有检查,只是凭内存写的..可能有语法错误..自己纠正..)

UIGraphicsBeginImageContext(yourFirstImage.size);
[yourFirstImage drawAtPoint:CGPointMake(0,0)];
[yourSecondImage drawAtPoint:CGPointMake(0,0)];

UIImage *mergedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

关于ios - iphone 图像合并,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5925659/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com