Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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 !
    ...

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, cap = cv2.VideoCapture("f.gif")
ret, image = cap.read()
cap.release()

if ret:
    # safe to work with image !
    ...