fix: OSError:broken data stream (#1430)

main
Thomas Albrecht 6 years ago committed by GitHub
parent 70b6f0f46c
commit 9344b067b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Auto annotation, TF annotation and Auto segmentation apps (https://github.com/opencv/cvat/pull/1409) - Auto annotation, TF annotation and Auto segmentation apps (https://github.com/opencv/cvat/pull/1409)
- Import works with truncated images now: "OSError:broken data stream" on corrupt images (https://github.com/opencv/cvat/pull/1430)
### Security ### Security
- -

@ -13,7 +13,11 @@ import av
import av.datasets import av.datasets
import numpy as np import numpy as np
from pyunpack import Archive from pyunpack import Archive
from PIL import Image from PIL import Image, ImageFile
# fixes: "OSError:broken data stream" when executing line 72 while loading images downloaded from the web
# see: https://stackoverflow.com/questions/42462431/oserror-broken-data-stream-when-reading-image-file
ImageFile.LOAD_TRUNCATED_IMAGES = True
from cvat.apps.engine.mime_types import mimetypes from cvat.apps.engine.mime_types import mimetypes

Loading…
Cancel
Save