Android Question Save Transparent Background - png file


Active Member
Licensed User
Dear all,
I try to re-save png file after resize it,
But the result image seam by black background instead of transparent background.
any comment to solve this problem

I use this code :
Dim b1 As Bitmap
b1 = LoadBitmap(Dir, FileName)
out = File.OpenOutput(File.DirRootExternal, "/" & Image_name.Text, False)
b1.WriteToStream(out, 100, "PNG")

Thanks on advance
Best regards


Active Member
Licensed User
Dear Mr. Erel,

Many thanks for your interest and for your reply.
Sure, I'll correct your notes.

About the image, sure the first image is transparent PNG and the created with Black background, I tested with may images.

note: I view the resized image in imageview and it appear still with transparent background so i think the problem from b1.WriteToStream(out, 100, "PNG")
what you think.

Thanks again for your interest.

Best regards
Upvote 0