You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will also affect other modules which produces base64 output as well (camera, file system, ...)
馃悰 Bug Report
The base64 output from Android and iOS for the method ImageManipulator.manipulateAsync does not match given the same image.
The output does not necessary need to be exactly matched, but the way base64 output is created currently not matched. When I look at the source code of expo-image-manipulator, on Android, the output is produced by:
jarvisluong
changed the title
[image-manipulator] add options to customize base64 encoding
[android] [image-manipulator] change base64 encoding options to match with other platforms
Apr 14, 2020
This will also affect other modules which produces base64 output as well (camera, file system, ...)
馃悰 Bug Report
The base64 output from Android and iOS for the method
ImageManipulator.manipulateAsync
does not match given the same image.The output does not necessary need to be exactly matched, but the way base64 output is created currently not matched. When I look at the source code of expo-image-manipulator, on Android, the output is produced by:
expo/packages/expo-image-manipulator/android/src/main/java/expo/modules/imagemanipulator/ImageManipulatorModule.java
Line 157 in 112256a
This option (Base64.DEFAULT) will produce a base64 result which will inject line termination character every 74 (maybe?) character.
on iOS:
expo/packages/expo-image-manipulator/ios/EXImageManipulator/EXImageManipulatorModule.m
Line 266 in 112256a
This option will produce a base64 result which will be a long line (without line terminators)
and on web:
expo/packages/expo-image-manipulator/src/ExpoImageManipulator.web.ts
Line 199 in 112256a
This method will produce a base64 result which will be a long line (without line terminators)
What we can do is to change the option on Android into:
(reference:
)
Environment
Steps to Reproduce
Here is a minimal snack: https://snack.expo.io/@bankify_expo_admin/085b26
Expected Behavior
The base64 output should be the same given the same image
Actual Behavior
Reproducible Demo
The text was updated successfully, but these errors were encountered: