Closed tdsolomons closed 6 months ago
I couldn't get the background less image to save. Background re-appears.
image = BackgroundRemoval.init().removeBackground(image: inputImage)
This shows image without background. Perfectly: Image(uiImage: image!)
But when I try to save, the image magically somehow still has the background.:
guard let data = image.pngData(), let url = getUrlForImage(imageName: imageName, folderName: FolderName) else {return}
do{ try data.write(to: url) }catch let error { print("Error saving image. ImageName:(imageName): (error)") }
Also when I observe the image object it still has background . (If I load a background less image from camera roll it behaves differently . It saves without background and also if I observe the object it does not has the background)
Please let me know what I'm doing wrong here.
I have the same issue
Did any one find the solution for this
Is there a solution for this now?
I found the solution in the place where there have been closed issues!!!
duplicates https://github.com/Ezaldeen99/BackgroundRemoval/issues/2
I couldn't get the background less image to save. Background re-appears.
image = BackgroundRemoval.init().removeBackground(image: inputImage)
This shows image without background. Perfectly: Image(uiImage: image!)
But when I try to save, the image magically somehow still has the background.:
guard let data = image.pngData(), let url = getUrlForImage(imageName: imageName, folderName: FolderName) else {return}
do{ try data.write(to: url) }catch let error { print("Error saving image. ImageName:(imageName): (error)") }
Also when I observe the image object it still has background . (If I load a background less image from camera roll it behaves differently . It saves without background and also if I observe the object it does not has the background)
Please let me know what I'm doing wrong here.