Embarcadero / P4D-Data-Sciences

A collection of lightweight Python wrappers based on Python4Delphi simplifying Data Sciences development with Delphi
MIT License
92 stars 21 forks source link

Fix Pillow - Variant need naming PIL #20

Closed peardox closed 2 years ago

peardox commented 2 years ago

Just tried out Pillow and RemBG (Basic sample in https://github.com/peardox/RemBGPillow)

Needed to change the name of the Variant to get it working - like OpenCV needs to be called cv2 Pillow needs to be called PIL for it to work

Once that's done it all works nicely

Check out the above Repo. The Image button will ask for a file (choose any image) then ask for a Save filename (make sure it ends in .png) and some magic removes the background saving the image.

Did this one Delphi-only so it's using variants to open, remove background and then save the result.