bgCut.net for PHP SDK (Composer)
PHP 8.1+
Official open-source PHP library: remove a background in three lines, with typed results and errors. MIT licence.
Installation
composer require bgcut-net/bgcut-php(or copy thesrc/folder andrequire_once 'src/autoload.php';).$bg = new BgCut\Client('bgc_…');$bg->removeToFile('photo.jpg', 'photo-nobg.png');- Six ready-to-run examples (single file, URL with white background, blur, bulk folder, account, upload form) are in the
examples/folder on GitHub.