Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Input buffer contains unsupported image format #132

Open
eliawk opened this issue Aug 27, 2024 · 1 comment
Open

Error: Input buffer contains unsupported image format #132

eliawk opened this issue Aug 27, 2024 · 1 comment

Comments

@eliawk
Copy link

eliawk commented Aug 27, 2024

Hello,
I'm trying to implement the node version like this:

// Convert photoSrc base64 to blob
    const photoSrcBlob = new Blob([Buffer.from(photoSrc, 'base64')], {
      type: 'image/png',
    })

    // Removing background
    const config: Config = {
      debug: false,
      model: 'medium',
      output: { format: 'image/png', quality: 0.5 },
    }

    const removedBackground = await removeBackground(photoSrcBlob, config)

When I pass the photoSrc Blob, i get this error:
"Error: Input buffer contains unsupported image format"

@IqroNegoro
Copy link

does anyone have found solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants