I'm a macOS user. I really only have one complaint (it's actually very minor): there's no simple default login icon, like the typical lifeless gray/white/blue person. I decided that I wanted my icon to completely blend in with the login background. There was only one problem—I had no idea how to do this.
I decided to actually figure this out since the red rose was bothering me. I came up with the following (horribly inefficient) psuedocode/algorithm to do this:
desk.png, and save this to a new file called
desk(this should leave an image array with many zeroes and some non-zero numbers where the old icon was)—name this new array
subinto a binary mask by setting all non-zero pixels to 1, name the mask
desk(your choice) into a variable named
finalto zero when
final.png, click crop, and save this to a new file called
This resulted in the following Python code (
numpy 1.18.2 and
I'm sure this can be made much more efficient with advanced N-dimensional array indexing, but that usually sacrifices code readability. Please contact me if you have ideas on how to make this faster! Note: the final product isn't perfect.