How to automate isolating line art from the background with code. Is there a way?
问题 This is what I like to do with code. Nothing is manually done in the process with Photoshop, so I think there is a way? but can't quite figure it out. This is what I did in Python: from PIL import Image im_rgb = Image.open('lena.jpg') im_a = Image.open('frame.png').convert('L').resize(im_rgb.size) im_rgba = im_rgb.copy() im_rgba.putalpha(im_a) im_rgba.save('final.png') but I'm looking for a solution in Java/Kotlin on Android Studio while I could live with a sample in Dart or C++ as well. 回答1: