Преобразование черно-белого растрового изображения в одноканальный JPEG в Android ⇐ Android
-
Гость
Преобразование черно-белого растрового изображения в одноканальный JPEG в Android
Is there any way to convert black and white bitmap to Single-Channel JPEG in Android?
I have a black and white bitmap that I create using ARGB_8 config. I need to send to server a Base64 of Single-Channel JPEG. I tried compressing my bitmap using Bitmap.compress(Bitmap.CompressFormat.JPEG, ...) but I always get a 3-channel image. I tried using ALPHA_8, but because it uses a transparency layer when I compress it to JPEG it is simply ignored.
Appreciate any help!
Источник: https://stackoverflow.com/questions/780 ... in-android
Is there any way to convert black and white bitmap to Single-Channel JPEG in Android?
I have a black and white bitmap that I create using ARGB_8 config. I need to send to server a Base64 of Single-Channel JPEG. I tried compressing my bitmap using Bitmap.compress(Bitmap.CompressFormat.JPEG, ...) but I always get a 3-channel image. I tried using ALPHA_8, but because it uses a transparency layer when I compress it to JPEG it is simply ignored.
Appreciate any help!
Источник: https://stackoverflow.com/questions/780 ... in-android
Мобильная версия