GabrielBB / Android-CutOut

Android image background removing library
Other
264 stars 90 forks source link

Problem when saving picture #3

Closed AASM-SA closed 5 years ago

AASM-SA commented 5 years ago

When I save the image that background of it has been deleted. The image appears in the gallery with a black background instead of a transparent background.

Before deleting the background: screenshot_ - 1 After deleting the background: screenshot_ - 1 The image in the gallary: screenshot_ - _gallery 1

GabrielBB commented 5 years ago

I think the black background is shown by your phone gallery app, it doesn't know what to do with the transparency so it just shows black. Send the picture to a computer to see how it really looks.

AASM-SA commented 5 years ago

actually i sent the image in whatsApp and the black background still there

smartselect_ - _whatsapp 1

GabrielBB commented 5 years ago

I see. What android version do you have? so i can make some tests

AASM-SA commented 5 years ago

Android 8.1.0, API 27

GabrielBB commented 5 years ago

@AASM-SA Did you make it work?

AASM-SA commented 5 years ago

yes, I just wrote this line before saving the image: imageView.setBackgroundResource(0); and I wrote these two lines when saving the image: BufferedOutputStream bos = new BufferedOutputStream(fileOutputStream); bm.compress(Bitmap.CompressFormat.PNG, quality, bos);