|
|
@@ -1,6 +1,7 @@
|
|
|
package com.goafanti.common.service;
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
@Service
|
|
|
public class ImageService {
|
|
|
@@ -9,8 +10,8 @@ public class ImageService {
|
|
|
private static final String LANGUAGE = "chi_sim";
|
|
|
|
|
|
|
|
|
-// public Object ImageOCR(MultipartFile file) {
|
|
|
-// String result = null;
|
|
|
+ public Object ImageOCR(MultipartFile file) {
|
|
|
+ String result = null;
|
|
|
// try {
|
|
|
// byte[] bytes = file.getBytes();
|
|
|
// BufferedImage image = ImageIO.read(new ByteArrayInputStream(bytes));
|
|
|
@@ -24,6 +25,6 @@ public class ImageService {
|
|
|
// } catch (IOException | TesseractException e) {
|
|
|
// throw new RuntimeException(e);
|
|
|
// }
|
|
|
-// return result;
|
|
|
-// }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|