Open txstc55 opened 5 months ago
Do we have any vue experts here?
maybe
❌ import removeBackground from '@imgly/background-removal';
⭕ import { removeBackground } from '@imgly/background-removal';
The brackets are needed for import yes
import { removeBackground } from '@imgly/background-removal';
// ...
const noBgBlob = await removeBackground(blob);
Tried to implement a simple background removal in vuejs:
However I kept getting error: (0 , _imgly_background_removalWEBPACK_IMPORTED_MODULE_0__.default) is not a function TypeError: (0 , _imgly_background_removalWEBPACK_IMPORTED_MODULE_0__.default) is not a function at Proxy.removeImageBackground (webpack-internal:///./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TextCanvas.vue?vue&type=script&lang=js:38:76) at image.onload (webpack-internal:///./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TextCanvas.vue?vue&type=script&lang=js:30:20)
I also tried to replace the call to imglyRemoveBackground according to https://www.npmjs.com/package/@imgly/background-removal I'm not sure why and I haven't seen any vuejs example with this package.