Skip to content

Commit 18b3279

Browse files
authored
Allow truncated images (#336)
1 parent a76722b commit 18b3279

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/database/images.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
import imantics as im
33

44

5-
from PIL import Image
5+
from PIL import Image, ImageFile
66
from mongoengine import *
77

88
from .events import Event, SessionEvent
99
from .datasets import DatasetModel
1010
from .annotations import AnnotationModel
1111

12+
13+
ImageFile.LOAD_TRUNCATED_IMAGES = True
14+
15+
1216
class ImageModel(DynamicDocument):
1317

1418
COCO_PROPERTIES = ["id", "width", "height", "file_name", "path", "license",\

0 commit comments

Comments
 (0)