mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-31 12:42:50 +08:00
[CB-4656] Don't add line-breaks to base64-encoded images.
This commit is contained in:
parent
df3141fef4
commit
382e9421e7
@ -763,7 +763,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
|||||||
try {
|
try {
|
||||||
if (bitmap.compress(CompressFormat.JPEG, mQuality, jpeg_data)) {
|
if (bitmap.compress(CompressFormat.JPEG, mQuality, jpeg_data)) {
|
||||||
byte[] code = jpeg_data.toByteArray();
|
byte[] code = jpeg_data.toByteArray();
|
||||||
byte[] output = Base64.encode(code, Base64.DEFAULT);
|
byte[] output = Base64.encode(code, Base64.NO_WRAP);
|
||||||
String js_out = new String(output);
|
String js_out = new String(output);
|
||||||
this.callbackContext.success(js_out);
|
this.callbackContext.success(js_out);
|
||||||
js_out = null;
|
js_out = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user