react-native-image-base64
react-native-image-base64 copied to clipboard
may not support image png conversion base64
I conversion .png to base64 , when i decoding base64 to png , the background is black
That's possible, we mainly designed this lib to send camera pictures which are JPEG so we didn't focus on PNG.
I add it to the roadmap, in the meantime feel free to PR :)
That's possible, we mainly designed this lib to send camera pictures which are JPEG so we didn't focus on PNG.
I add it to the roadmap, in the meantime feel free to PR :)
any news on it?
@Desintegrator did you find any way to remove the dark background in image?
@Desintegrator did you find any way to remove the dark background in image?
@kirantripathi yes, its works correctly in ios without any changes and for android you need to open RNImgToBase64Module.java in lib sources and change single line in "bitmapToBase64" method bitmap.compress(Bitmap.CompressFormat.JPEG, 80, byteArrayOutputStream); to bitmap.compress(Bitmap.CompressFormat.PNG, 80, byteArrayOutputStream);
@Desintegrator did you find any way to remove the dark background in image?
@kirantripathi yes, its works correctly in ios without any changes and for android you need to open RNImgToBase64Module.java in lib sources and change single line in "bitmapToBase64" method
bitmap.compress(Bitmap.CompressFormat.JPEG, 80, byteArrayOutputStream);tobitmap.compress(Bitmap.CompressFormat.PNG, 80, byteArrayOutputStream);
@Desintegrator thank you for your help.