Updated blob mode from 'c' to 'r' when creating thumbnails to handle uncommitted changes
authorThierry Florac <tflorac@ulthar.net>
Wed, 24 Oct 2018 09:25:11 +0200
changeset 146 4b44f2acda26
parent 145 b3e0a7593d19
child 147 015342e304c8
Updated blob mode from 'c' to 'r' when creating thumbnails to handle uncommitted changes
src/pyams_file/image.py
--- a/src/pyams_file/image.py	Wed Oct 24 09:24:14 2018 +0200
+++ b/src/pyams_file/image.py	Wed Oct 24 09:25:11 2018 +0200
@@ -74,7 +74,7 @@
         else:
             return None
         # check format
-        image = Image.open(self.context.get_blob(mode='c'))
+        image = Image.open(self.context.get_blob(mode='r'))
         if not format:
             format = image.format
         format = format.upper()
@@ -119,7 +119,7 @@
         else:
             return None
         # check format
-        image = Image.open(self.context.get_blob(mode='c'))
+        image = Image.open(self.context.get_blob(mode='r'))
         if not format:
             format = image.format
         format = format.upper()