File tree 2 files changed +2
-2
lines changed
Modules/@babylonjs/react-native
android/src/main/java/com/babylonreactnative
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public void takeSnapshot() {
125
125
String encoded = "" ;
126
126
if (copyResult == PixelCopy .SUCCESS ) {
127
127
ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream ();
128
- bitmap .compress (Bitmap .CompressFormat .JPEG , 100 , byteArrayStream );
128
+ bitmap .compress (Bitmap .CompressFormat .JPEG , 80 , byteArrayStream );
129
129
byte [] byteArray = byteArrayStream .toByteArray ();
130
130
bitmap .recycle ();
131
131
encoded = Base64 .encodeToString (byteArray , Base64 .DEFAULT );
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ - (void)takeSnapshot {
80
80
// Grab the image from the graphics context, and convert into a base64 encoded JPG.
81
81
UIImage* capturedImage = UIGraphicsGetImageFromCurrentImageContext ();
82
82
UIGraphicsEndImageContext ();
83
- NSData * jpgData = UIImageJPEGRepresentation (capturedImage, 1 . 0f );
83
+ NSData * jpgData = UIImageJPEGRepresentation (capturedImage, . 8f );
84
84
NSString * encodedData = [jpgData base64EncodedStringWithOptions: 0 ];
85
85
86
86
// Fire the onSnapshotDataReturned event if hooked up.
You can’t perform that action at this time.
0 commit comments