Difference between images while keeping semi-transparency
Posted: 2018-06-06T07:08:39-07:00
Hi there,
I'm on Windows 10 and uses ImageMagick-7.0.7-Q16. Just a warning beforehand, this question is related to adult stuff since I'm working on an adult game and I'd like to create an automated script which will extract the cloth layers automatically of the girls in my game.
I have two images, one of a naked girl, the second one of the same girl but with cloth. Identical stance, same dimensions and almost similar colors (I'll use -fuzz 1% to cover this part, it should be enough).
http://www.glassix-game.com/naked.png
http://www.glassix-game.com/cloth.png
I've been trying different ways to get a third image containing just the cloth without the girl and retaining the semi-transparent pixel but to no avail...
So far, I've been using :
http://www.glassix-game.com/result.png
But it doesn't keep semi-transparency on the edges of the girl with change_mask. I've read I'd need to use dst_in but I can't figure how to adapt the script to make it work. Any mask I try to produce just lose the edge transparency whatever I tried.
Any idea ?
Thanks !
I'm on Windows 10 and uses ImageMagick-7.0.7-Q16. Just a warning beforehand, this question is related to adult stuff since I'm working on an adult game and I'd like to create an automated script which will extract the cloth layers automatically of the girls in my game.
I have two images, one of a naked girl, the second one of the same girl but with cloth. Identical stance, same dimensions and almost similar colors (I'll use -fuzz 1% to cover this part, it should be enough).
http://www.glassix-game.com/naked.png
http://www.glassix-game.com/cloth.png
I've been trying different ways to get a third image containing just the cloth without the girl and retaining the semi-transparent pixel but to no avail...
So far, I've been using :
Code: Select all
convert convert -fuzz 1% -compose change_mask -composite cloth.png naked.png result.png
But it doesn't keep semi-transparency on the edges of the girl with change_mask. I've read I'd need to use dst_in but I can't figure how to adapt the script to make it work. Any mask I try to produce just lose the edge transparency whatever I tried.
Any idea ?
Thanks !