android - 在 native react 中将两个图像组合成一个新图像

标签 android image react-native merge combinations

我有两个单独的图像,一个是从相机点击的主图像,另一个是我从图库中挑选的图像,它是一个 Logo ,我需要将这两张图像组合起来制作新图像,以便我可以将该图像保存到图库中并在社交媒体上分享我需要用 React Native 来做到这一点谢谢你的帮助

<Image
    style={{width: width, height: height*.7}}
    source={{ uri: imageAdress }} />
<Image 
   source={this.state.avatarSource} 
   style={{width: 80, height: 80, position:'absolute', top: 20, left: 20}} />

这是我现在需要合并的两张图片。

最佳答案

我已经找到了问题的答案。您可以为您的 View 拍摄快照,这很简单,您可以将两个图像放在一个 View 中并为该 View 拍摄快照。我用这个插件。

react native View 拍摄

https://github.com/gre/react-native-view-shot

这将允许您拍摄特定 View 的快照 谢谢

关于android - 在 native react 中将两个图像组合成一个新图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47132321/

相关文章:

Android Espresso listView 滚动到

java - 我该怎么做 "one-many"关系?

Android 应用程序不响应短信接收器

python - 使用python从图像中提取补丁

c# - 使用套接字通过网络发送图像,数据困惑

reactjs - 更新 useState 和 AsyncStorage 并根据给定结果重新渲染屏幕

android - AVD 启动过程中的错误消息

javascript - 尝试使用javascript下载所有谷歌搜索图像

swift - 没有 UI 的 React Native 组件

react-native - react native : Possible unhandled promise rejection