From be19709f052945fc7c1d4ee6b479ab1ff5fec3b6 Mon Sep 17 00:00:00 2001 From: Conor Atkins <38171851+RoshanStacker@users.noreply.github.com> Date: Thu, 27 Oct 2022 18:23:31 +1100 Subject: [PATCH] Added .PNG for image type detection For https://github.com/Labelbox/labelbox-python/issues/740 Some devices can create photos with capitalised .PNG such as Iphones. --- labelbox/data/serialization/labelbox_v1/label.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labelbox/data/serialization/labelbox_v1/label.py b/labelbox/data/serialization/labelbox_v1/label.py index 587722911..ff4da0e4c 100644 --- a/labelbox/data/serialization/labelbox_v1/label.py +++ b/labelbox/data/serialization/labelbox_v1/label.py @@ -213,7 +213,7 @@ def _infer_media_type(self) -> str: elif self._has_object_annotations(): return 'image' else: - if self._row_contains((".jpg", ".png", ".jpeg")) and self._is_url(): + if self._row_contains((".jpg", ".png", ".PNG", ".jpeg")) and self._is_url(): return 'image' elif (self._row_contains((".txt", ".text", ".html")) and self._is_url()) or not self._is_url():