Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

may not support image png conversion base64 #4

Open
MrZhang123 opened this issue Mar 29, 2018 · 5 comments
Open

may not support image png conversion base64 #4

MrZhang123 opened this issue Mar 29, 2018 · 5 comments

Comments

@MrZhang123
Copy link

I conversion .png to base64 , when i decoding base64 to png , the background is black

@Michaelvilleneuve
Copy link

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 :)

@Desintegrator
Copy link

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?

@kirantripathi
Copy link

@Desintegrator did you find any way to remove the dark background in image?

@Desintegrator
Copy link

@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);

@kirantripathi
Copy link

@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 thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants