With Smart Objects,You can scale, rotate, skew, distort, perspective transform a layer, but warp!
if you replace the contents, the warp can’t be successed.
截屏2021-11-11 下午12.11.19.jpg (187.1 KB)
但奇怪的是智能对象的warp操作信息并没有丢失,它只是因为置换进去的图片格式错误,而无法正确应用!
如果这时候你在photoshop中打开这个编辑好的psd文件,再去手动替换一下智能对象的内容,他是可以无损置换到另一张图片上去的!
我的代码是:
ByteArrayOutputStream stream = new ByteArrayOutputStream();
new_innerImage.save(stream); //栅格化图层innerImage存入流stream中
smartObjectLayer.setContents(stream.toByteArray()); //流stream转数组,然后设置为智能对象的内容