You can use the `pixels` function to map an already black-white image to black-transparent.
You can find the Lain code here: https://gist.github.com/blad/bada86549b367cefd47fb82f8ac954c9
Here's an example I created...
Original lion image is from: https://unsplash.com/photos/SQszo1mP4sk/info