Ask Your Question

Revision history [back]

Intercept Corrupt Data

Hello, I have some corrupted image data mixed with some images. When I load it with

cv2.imread(image)

I get the error

Corrupt JPEG data

I would like to intercept this and move those images to a folder since they have corruption issues. However, it doesn't seem to be an exception so I cannot catch it. Any help is appreciated.