"ppocr/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "a0d1f9236d66fc113e7d54462b255651ad7f8f24"
Commit b5a1fe64 authored by LDOUBLEV's avatar LDOUBLEV
Browse files

if gif is None, return

parent 60ec9546
......@@ -82,6 +82,7 @@ def check_and_read_gif(img_path):
ret, frame = gif.read()
if not ret:
logging.info("Cannot read {}. This gif image maybe corrupted.")
return None, False
if len(frame.shape) == 2 or frame.shape[-1] == 1:
frame = cv2.cvtColor(frame, cv2.COLOR_GRAY2RGB)
imgvalue = frame[:, :, ::-1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment