The app is compiled with following version config:
compileSdkVersion 23
buildToolsVersion "23.0.2"
minSdkVersion 18
targetSdkVersion 23
The app has a bitmap which contains transparent regions. I'm using WEBP format to save the bitmap to file.
Bitmap config is ARGB_8888
bitmap.hasAlpha() returns true
Tested the particular pixels in the Bitmap before saving and verified that some regions are transparent.
bitmap.compress(Bitmap.CompressFormat.WEBP, 100, fileOutputStream)
The above code works correctly when tested with API v22, v23. transparency details are stored in the generated file.
The same code, when tested with API v18, v19, v21 doesn't save the alpha channel to file. The transparent regions are black.
All API versions work correctly while decoding the WEBP file.
I'm about to bundle the libwebp with the app, but seems like all documentation suggests that this should be supported. Has anyone faced a similar issue?
UPDATE: I implemented the encoding using libwebp native library. Still curious if anyone else came across the same issue