Skip to content

Commit 27b6f40

Browse files
authored
test: expo-example add ExpoImageManipulator (#216)
* docs: expo eas build * test: expo-example add ExpoImageManipulator
1 parent 4b6ed76 commit 27b6f40

File tree

6 files changed

+29
-11
lines changed

6 files changed

+29
-11
lines changed

README.MD

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,18 @@ npx expo install react-native-image-marker
112112
# compile
113113
npx expo prebuild
114114

115+
eas build
116+
115117
```
116118

117119
## Compatibility
118120

119121
| React Native Version | react-native-image-marker Version |
120122
| ---------------------| --------------------------------- |
121-
| < 0.60.0 | v0.5.2 or earlier |
122-
| >= 0.60.0, ***iOS < 13, Android < N(API Level 24)*** | v1.0.x |
123-
| 0.60.0 <= rn version < 0.73.0 | v1.1.x |
124123
| >= 0.73.0, other cases | v1.2.0 or later |
124+
| 0.60.0 <= rn version < 0.73.0 | v1.1.x |
125+
| >= 0.60.0, ***iOS < 13, Android < N(API Level 24)*** | v1.0.x |
126+
| < 0.60.0 | v0.5.2 or earlier |
125127

126128
> ***Note: This table is only applicable to major versions of react-native-image-marker. Patch versions should be backwards compatible.***
127129

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ PODS:
946946
- React-debug
947947
- react-native-blob-util (0.19.6):
948948
- React-Core
949-
- react-native-image-marker (1.2.4-beta.4):
949+
- react-native-image-marker (1.2.5):
950950
- React-Core
951951
- react-native-image-picker (5.7.0):
952952
- React-Core
@@ -1360,7 +1360,7 @@ SPEC CHECKSUMS:
13601360
React-logger: e0c1e918d9588a9f39c9bc62d9d6bfe9ca238d9d
13611361
React-Mapbuffer: 9731a0a63ebaf8976014623c4d637744d7353a7c
13621362
react-native-blob-util: d8fa1a7f726867907a8e43163fdd8b441d4489ea
1363-
react-native-image-marker: 9aa793ce8195941aaed5482a23d926b51f6b5b9f
1363+
react-native-image-marker: a522385247e45a2e5cc8dfc8daeda5c833828b17
13641364
react-native-image-picker: 3269f75c251cdcd61ab51b911dd30d6fff8c6169
13651365
React-nativeconfig: 37aecd26d64b79327c3f10e43b2e9a6c425e0a60
13661366
React-NativeModulesApple: 9ca6d2eaa1dd5606588262195b46d0774bdec83a

expo-example/App.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
import Toast from 'react-native-toast-message';
3131
import * as FileSystem from 'expo-file-system';
3232
import filesize from 'filesize';
33+
import * as ImageManipulator from 'expo-image-manipulator';
3334

3435
const icon = require('./assets/icon.jpeg');
3536
const icon1 = require('./assets/yahaha.jpeg');
@@ -121,7 +122,7 @@ const s = StyleSheet.create({
121122
padding: 10,
122123
},
123124
shortTextInput: {
124-
width: 30,
125+
width: 40,
125126
height: 30,
126127
backgroundColor: '#ffA',
127128
borderColor: '#00B96B5A',
@@ -587,6 +588,12 @@ function useViewModel() {
587588
setShow(true);
588589
const stat = await FileSystem.getInfoAsync(path);
589590
setFileSize(filesize.filesize(stat.exists ? stat.size : 0));
591+
const imRes = await ImageManipulator.manipulateAsync(path, [
592+
{
593+
rotate: 90,
594+
},
595+
]);
596+
console.log(imRes);
590597
} catch (err) {
591598
console.log('====================================');
592599
console.log(err, 'err');

expo-example/ios/Podfile.lock

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ PODS:
1212
- ExpoModulesCore
1313
- ExpoFileSystem (16.0.5):
1414
- ExpoModulesCore
15+
- ExpoImageManipulator (11.8.0):
16+
- EXImageLoader
17+
- ExpoModulesCore
1518
- ExpoImagePicker (14.7.1):
1619
- ExpoModulesCore
1720
- ExpoKeepAwake (12.8.2):
@@ -908,7 +911,7 @@ PODS:
908911
- React-Mapbuffer (0.73.2):
909912
- glog
910913
- React-debug
911-
- react-native-image-marker (1.2.4-beta.4):
914+
- react-native-image-marker (1.2.5):
912915
- React-Core
913916
- React-nativeconfig (0.73.2)
914917
- React-NativeModulesApple (0.73.2):
@@ -1088,6 +1091,7 @@ DEPENDENCIES:
10881091
- EXImageLoader (from `../node_modules/expo-image-loader/ios`)
10891092
- Expo (from `../node_modules/expo`)
10901093
- ExpoFileSystem (from `../node_modules/expo-file-system/ios`)
1094+
- ExpoImageManipulator (from `../node_modules/expo-image-manipulator/ios`)
10911095
- ExpoImagePicker (from `../node_modules/expo-image-picker/ios`)
10921096
- ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
10931097
- ExpoModulesCore (from `../node_modules/expo-modules-core`)
@@ -1163,6 +1167,8 @@ EXTERNAL SOURCES:
11631167
:path: "../node_modules/expo"
11641168
ExpoFileSystem:
11651169
:path: "../node_modules/expo-file-system/ios"
1170+
ExpoImageManipulator:
1171+
:path: "../node_modules/expo-image-manipulator/ios"
11661172
ExpoImagePicker:
11671173
:path: "../node_modules/expo-image-picker/ios"
11681174
ExpoKeepAwake:
@@ -1273,6 +1279,7 @@ SPEC CHECKSUMS:
12731279
EXImageLoader: 55080616b2fe9da19ef8c7f706afd9814e279b6b
12741280
Expo: 88b4aa68115bbb57c1a07cc30161c2352ab2fc25
12751281
ExpoFileSystem: 04795dd4d47e76eaf12e38c92091f77d794f9e7f
1282+
ExpoImageManipulator: c1d7cb865eacd620a35659f3da34c70531f10b59
12761283
ExpoImagePicker: 66970181d1c838f444e5e1f81b804ab2d5ff49bd
12771284
ExpoKeepAwake: 0f5cad99603a3268e50af9a6eb8b76d0d9ac956c
12781285
ExpoModulesCore: 96d1751929ad10622773bb729ab28a8423f0dd0c
@@ -1303,7 +1310,7 @@ SPEC CHECKSUMS:
13031310
React-jsinspector: 03644c063fc3621c9a4e8bf263a8150909129618
13041311
React-logger: 66b168e2b2bee57bd8ce9e69f739d805732a5570
13051312
React-Mapbuffer: 9ee041e1d7be96da6d76a251f92e72b711c651d6
1306-
react-native-image-marker: 9aa793ce8195941aaed5482a23d926b51f6b5b9f
1313+
react-native-image-marker: a522385247e45a2e5cc8dfc8daeda5c833828b17
13071314
React-nativeconfig: d753fbbc8cecc8ae413d615599ac378bbf6999bb
13081315
React-NativeModulesApple: 964f4eeab1b4325e8b6a799cf4444c3fd4eb0a9c
13091316
React-perflogger: 29efe63b7ef5fbaaa50ef6eaa92482f98a24b97e

expo-example/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
"expo": "~50.0.3",
1515
"expo-file-system": "~16.0.5",
1616
"expo-font": "~11.10.2",
17+
"expo-image-manipulator": "~11.8.0",
1718
"expo-image-picker": "~14.7.1",
1819
"expo-status-bar": "~1.11.1",
1920
"filesize": "^10.1.0",
2021
"react": "18.2.0",
2122
"react-native": "0.73.2",
22-
"react-native-toast-message": "^2.2.0",
23-
"react-native-image-marker": "*"
23+
"react-native-image-marker": "*",
24+
"react-native-toast-message": "^2.2.0"
2425
},
2526
"devDependencies": {
2627
"@babel/core": "^7.20.0",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"bootstrap": "yarn example && yarn install && yarn example pods && yarn expo-example && yarn expo-example expo-install",
3939
"bootstrap-m1": "yarn example && yarn install && yarn example m1-pods",
4040
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build",
41-
"docs": "typedoc --excludePrivate --tsconfig tsconfig.doc.json"
41+
"docs": "typedoc --excludePrivate --tsconfig tsconfig.doc.json",
42+
"expo-install": "yarn expo-example expo-install"
4243
},
4344
"keywords": [
4445
"react-native",

0 commit comments

Comments
 (0)