-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
182 lines (171 loc) · 15.9 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React, {useEffect, useState} from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Image,
Text,
StatusBar,
Platform
} from 'react-native';
import OpenCV from './src/NativeModules/OpenCV';
import {NativeModules} from 'react-native';
import {
Header,
LearnMoreLinks,
Colors,
DebugInstructions,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
const checkForBlurryImage = (imageAsBase64)=> {
return new Promise((resolve, reject) => {
if (Platform.OS === 'android') {
OpenCV.checkForBlurryImage(
imageAsBase64,
(error) => {
console.log(error);
},
(msg) => {
resolve(msg);
});
} else {
OpenCV.checkForBlurryImage(imageAsBase64, (error, dataArray) => {
resolve(dataArray[0]);
});
}
});
};
const covertToBlackAndWhite = (imageAsBase64)=> {
return new Promise((resolve, reject) => {
if (Platform.OS === 'android') {
OpenCV.covertToBlackAndWhite(
imageAsBase64,
(error) => {
console.log(error);
},
(msg) => {
resolve(msg);
});
} else {
OpenCV.covertToBlackAndWhite(imageAsBase64, (error, dataArray) => {
resolve(dataArray[0]);
});
}
});
};
const photo='iVBORw0KGgoAAAANSUh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qFv+k6sXF0vHx7OJ2VlUtCOIwqalCEpKBqfeUMekRQtIYEQaFA2iSya3DLAENqkhlp9/nztHBVFbj0ZIUlqHRAAWFIQNIichrYPkOIwWFRUEAZrFAgEETJRBSUQBOzVCCAiTmOYbK73L78437w+ir0CY5YNoU8x9V1o0qCEy82uG/rCkPd5mQJbREEkMhYREUG8dWQAjFpAF1gxMrjM5xghDV1CELY3r7Z1J9PMI5KyMrJxmfZsMopIyEBglUAkXSxv2rqxFsQhkDKpEgIrWJIAiEqoMMN0wr2sl/LLWb4iAAABWklEQVT22+L6u/20LBTJZuIgdH03DGEIQ+oNobOmG4a7unkwr9gJkSEUEAMgBhHwveMSw2iIQDiKZEWGZFiFOHALSaHpZFt3npwxaIQMkoJuh4ZD6lbRODOdjDR58qggt5utarCFAVAQ0KSAoA4VgAxiDuH36rs/XF92t+8+vX1bb+5ODcxQyfgeI1qjysDMQxTgylhDdDnE2832yXzsBZhMYjZJ/uEJIuB7m0UKA4swFUSMqpKMKmNIKqJc0958L4VBoygIKcQYU0xN7LzJZ+NqVlaZc9bQwHjV7diLXaSuVStgkiKTWEGvUq7f/cubrx/c3vzn7d1vQ3PXtqfOLtQ5MsZgArCRXZYpxLbfppQ8UQG2tb5vmmDVWwhGBOEfQg8gqlZIOIkFMmIIUTNmASF0wCxxkBKq/XyxajqDhSnQoBURkKgIlcun00nuClKrCuTstq2XMpAv/n9vobOIu4egeAAAAABJRU5ErkJggg=='
const App: () => React$Node = () => {
const [img, setImg] = useState();
useEffect(() => {
console.log(NativeModules)
console.log(OpenCV);
//checkForBlurryImage(photo).then((res) => console.log(res));
covertToBlackAndWhite(photo).then((res) => {
console.log(res);
setImg(res);
});
}, []);
return (
<>
<StatusBar barStyle="dark-content" />
<SafeAreaView>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={styles.scrollView}>
<Header />
{global.HermesInternal == null ? null : (
<View style={styles.engine}>
<Text style={styles.footer}>Engine: Hermes</Text>
</View>
)}
<View style={styles.body}>
<View style={styles.sectionContainer}>
<Text style={styles.sectionTitle}>OpenCV(4.2) + React Native(0.63.2)</Text>
<Image source={{uri: 'data:image/png;base64,' + photo}} style={{
width: 200,
height: 200,
resizeMode: 'contain'
}} />
<Image source={{uri: 'data:image/png;base64,' + img}} style={{
width: 200,
height: 200,
resizeMode: 'contain'
}} />
<Text style={styles.sectionTitle}>Step One</Text>
<Text style={styles.sectionDescription}>
Edit <Text style={styles.highlight}>App.js</Text> to change this
screen and then come back to see your edits.
</Text>
</View>
<View style={styles.sectionContainer}>
<Text style={styles.sectionTitle}>See Your Changes</Text>
<Text style={styles.sectionDescription}>
<ReloadInstructions />
</Text>
</View>
<View style={styles.sectionContainer}>
<Text style={styles.sectionTitle}>Debug</Text>
<Text style={styles.sectionDescription}>
<DebugInstructions />
</Text>
</View>
<View style={styles.sectionContainer}>
<Text style={styles.sectionTitle}>Learn More</Text>
<Text style={styles.sectionDescription}>
Read the docs to discover what to do next:
</Text>
</View>
<LearnMoreLinks />
</View>
</ScrollView>
</SafeAreaView>
</>
);
};
const styles = StyleSheet.create({
scrollView: {
backgroundColor: Colors.lighter,
},
engine: {
position: 'absolute',
right: 0,
},
body: {
backgroundColor: Colors.white,
},
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
color: Colors.black,
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
color: Colors.dark,
},
highlight: {
fontWeight: '700',
},
footer: {
color: Colors.dark,
fontSize: 12,
fontWeight: '600',
padding: 4,
paddingRight: 12,
textAlign: 'right',
},
});
export default App;