tjdevries / subd

subd - a place to reward your subscribers from any platform
50 stars 7 forks source link

Add `!upload_image` WIP #74

Closed rockerBOO closed 1 year ago

rockerBOO commented 1 year ago

Note: this should work, but I couldn't get postgres working, so couldn't compile. Also, possible security issues since it downloads the file (with curl) right into a python script (rembg).

!upload_image URL will download the image, remove the background, and resize into a 256x256 image size (by the largest dimension, and keeping the aspect ratio).

Needs

curl -s {} | rembg i > output.png
convert output.png -resize 256x256^ {}
davidbegin commented 1 year ago

thank you! I'll give this a test and then merge it in.