online remove image background code example

Example 1: remove background from image

Use this one its best
linK: https://www.remove.bg/

Example 2: background remover

This one provides unlimited free full-resolution PNGs
https://erase.bg/

Example 3: Remove Image BG

// Requires "guzzle" to be installed (see guzzlephp.org)

$client = new GuzzleHttp\Client();
$res = $client->post('https://api.remove.bg/v1.0/removebg', [
    'multipart' => [
        [
            'name'     => 'image_file',
            'contents' => fopen('/path/to/file.jpg', 'r')
        ],
        [
            'name'     => 'size',
            'contents' => 'auto'
        ]
    ],
    'headers' => [
        'X-Api-Key' => 'INSERT_YOUR_API_KEY_HERE'
    ]
]);

$fp = fopen("no-bg.png", "wb");
fwrite($fp, $res->getBody());
fclose($fp);

Example 4: online background removal

i am genuinely unbiased - https://www.remove.bg/ is good (you don't have to download to your device, just right click and copy)

Tags:

Misc Example