Android WEBP encoding in API v18 and above: bitmap.compress(Bitmap.CompressFormat.WEBP, 100, outputStream) doesn't save the alpha channel for API < 22
问题 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