cv2.imread fail to open gif image
Can anybody tell why imread function will fail for this photo?
Actual file is here: https://drive.google.com/file/d/1qFPK...
Can anybody tell why imread function will fail for this photo?
Actual file is here: https://drive.google.com/file/d/1qFPK...
easy one, imread() won't read any .gif there is no codec for this (license problem)
as a workaround (and if you have ffmpeg support builtin), try:
cap = cv2.VideoCapture("f.gif")
ret, image = cap.read()
cap.release()
if ret:
# safe to work with image !
...
Asked: 2020-02-20 12:55:41 -0600
Seen: 15,187 times
Last updated: Feb 21 '20