소스 검색

v3.0: from_buffer

Tinger 2 년 전
부모
커밋
b0a65f9770
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      utils/util.py

+ 1 - 1
utils/util.py

@@ -65,7 +65,7 @@ def str_include(str_long: "str", str_short: "str") -> "bool":
 
 
 def read_img(content: "str") -> "np.ndarray":
-    return cv2.imdecode(np.fromstring(content, np.uint8), 1)  # noqa
+    return cv2.imdecode(np.frombuffer(content, np.uint8), 1)  # noqa
 
 
 def rot_img(img: "np.ndarray") -> "list[np.ndarray]":