Showing
5 changed files
with
17 additions
and
8 deletions
@@ -22,7 +22,7 @@ rootProject.allprojects { | @@ -22,7 +22,7 @@ rootProject.allprojects { | ||
22 | apply plugin: 'com.android.library' | 22 | apply plugin: 'com.android.library' |
23 | 23 | ||
24 | android { | 24 | android { |
25 | - compileSdkVersion 30 | 25 | + compileSdkVersion 33 |
26 | 26 | ||
27 | compileOptions { | 27 | compileOptions { |
28 | sourceCompatibility JavaVersion.VERSION_1_8 | 28 | sourceCompatibility JavaVersion.VERSION_1_8 |
@@ -31,6 +31,8 @@ android { | @@ -31,6 +31,8 @@ android { | ||
31 | 31 | ||
32 | defaultConfig { | 32 | defaultConfig { |
33 | minSdkVersion 21 | 33 | minSdkVersion 21 |
34 | + targetSdkVersion 30 | ||
35 | + ndkVersion "25.2.9519653" | ||
34 | } | 36 | } |
35 | 37 | ||
36 | externalNativeBuild{ | 38 | externalNativeBuild{ |
@@ -41,14 +41,17 @@ android { | @@ -41,14 +41,17 @@ android { | ||
41 | } | 41 | } |
42 | 42 | ||
43 | defaultConfig { | 43 | defaultConfig { |
44 | + compileSdkVersion 33 | ||
45 | + | ||
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). |
45 | applicationId "vn.thuanpm.example" | 47 | applicationId "vn.thuanpm.example" |
46 | // You can update the following values to match your application needs. | 48 | // You can update the following values to match your application needs. |
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. | 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. |
48 | minSdkVersion 21 | 50 | minSdkVersion 21 |
49 | - targetSdkVersion flutter.targetSdkVersion | 51 | + targetSdkVersion 33 |
50 | versionCode flutterVersionCode.toInteger() | 52 | versionCode flutterVersionCode.toInteger() |
51 | versionName flutterVersionName | 53 | versionName flutterVersionName |
54 | + ndkVersion "25.2.9519653" | ||
52 | } | 55 | } |
53 | 56 | ||
54 | buildTypes { | 57 | buildTypes { |
@@ -70,7 +70,7 @@ class _MyHomePageState extends State<MyHomePage> { | @@ -70,7 +70,7 @@ class _MyHomePageState extends State<MyHomePage> { | ||
70 | 70 | ||
71 | Future<void> initCamera() async { | 71 | Future<void> initCamera() async { |
72 | final cameras = await availableCameras(); | 72 | final cameras = await availableCameras(); |
73 | - _cameraController = CameraController(cameras[0], ResolutionPreset.low, | 73 | + _cameraController = CameraController(cameras[0], ResolutionPreset.medium, |
74 | imageFormatGroup: ImageFormatGroup.yuv420); | 74 | imageFormatGroup: ImageFormatGroup.yuv420); |
75 | await _cameraController.initialize(); | 75 | await _cameraController.initialize(); |
76 | await _cameraController.startImageStream((image) { | 76 | await _cameraController.startImageStream((image) { |
@@ -90,10 +90,10 @@ class _MyHomePageState extends State<MyHomePage> { | @@ -90,10 +90,10 @@ class _MyHomePageState extends State<MyHomePage> { | ||
90 | plane0: savedImage.planes[0].bytes, | 90 | plane0: savedImage.planes[0].bytes, |
91 | plane1: savedImage.planes[1].bytes, | 91 | plane1: savedImage.planes[1].bytes, |
92 | plane2: savedImage.planes[2].bytes, | 92 | plane2: savedImage.planes[2].bytes, |
93 | - rotationAngle: 15, | 93 | + // rotationAngle: 15, |
94 | width: savedImage.width, | 94 | width: savedImage.width, |
95 | - isFlipHoriozntal: true, | ||
96 | - isFlipVectical: true, | 95 | + // isFlipHoriozntal: true, |
96 | + // isFlipVectical: true, | ||
97 | ); | 97 | ); |
98 | 98 | ||
99 | // return _processingCameraImage.processCameraImageToGrayIOS( | 99 | // return _processingCameraImage.processCameraImageToGrayIOS( |
@@ -124,7 +124,7 @@ class _MyHomePageState extends State<MyHomePage> { | @@ -124,7 +124,7 @@ class _MyHomePageState extends State<MyHomePage> { | ||
124 | body: Center( | 124 | body: Center( |
125 | child: currentImage != null | 125 | child: currentImage != null |
126 | ? Image.memory(Uint8List.fromList( | 126 | ? Image.memory(Uint8List.fromList( |
127 | - imglib.encodePng(currentImage!))) | 127 | + imglib.encodeJpg(currentImage!))) |
128 | : Container(), | 128 | : Container(), |
129 | ), | 129 | ), |
130 | ))); | 130 | ))); |
1 | name: processing_camera_image | 1 | name: processing_camera_image |
2 | description: A Plutter plugin with C native for processing camera image from package camera | 2 | description: A Plutter plugin with C native for processing camera image from package camera |
3 | -version: 0.0.11 | 3 | +version: 0.0.12 |
4 | repository: https://github.com/thuanpham98/processing_camera_image | 4 | repository: https://github.com/thuanpham98/processing_camera_image |
5 | homepage: https://github.com/thuanpham98/processing_camera_image | 5 | homepage: https://github.com/thuanpham98/processing_camera_image |
6 | 6 |
-
Please register or login to post a comment