Show More
@@ -1079,8 +1079,7 b' class Image(DisplayObject):' | |||
|
1079 | 1079 | if ext == u'png': |
|
1080 | 1080 | format = self._FMT_PNG |
|
1081 | 1081 | if ext == u'gif': |
|
1082 | # use PNG format until we understand why GIF is not working | |
|
1083 | format = self._FMT_PNG | |
|
1082 | format = self._FMT_GIF | |
|
1084 | 1083 | else: |
|
1085 | 1084 | format = ext.lower() |
|
1086 | 1085 | elif isinstance(data, bytes): |
@@ -1097,10 +1096,6 b' class Image(DisplayObject):' | |||
|
1097 | 1096 | # jpg->jpeg |
|
1098 | 1097 | format = self._FMT_JPEG |
|
1099 | 1098 | |
|
1100 | if format == self._FMT_GIF: | |
|
1101 | # use PNG format until we understand why GIF is not working | |
|
1102 | format = self._FMT_PNG | |
|
1103 | ||
|
1104 | 1099 | self.format = format.lower() |
|
1105 | 1100 | self.embed = embed if embed is not None else (url is None) |
|
1106 | 1101 | |
@@ -1130,6 +1125,8 b' class Image(DisplayObject):' | |||
|
1130 | 1125 | w, h = _pngxy(self.data) |
|
1131 | 1126 | elif self.format == self._FMT_JPEG: |
|
1132 | 1127 | w, h = _jpegxy(self.data) |
|
1128 | elif self.format == self._FMT_GIF: | |
|
1129 | w, h = _pngxy(self.data) | |
|
1133 | 1130 | else: |
|
1134 | 1131 | # retina only supports png |
|
1135 | 1132 | return |
@@ -1184,7 +1181,7 b' class Image(DisplayObject):' | |||
|
1184 | 1181 | return self._data_and_metadata() |
|
1185 | 1182 | |
|
1186 | 1183 | def _repr_gif_(self): |
|
1187 |
if self.embed and self.format == self._FMT_ |
|
|
1184 | if self.embed and self.format == self._FMT_GIF: | |
|
1188 | 1185 | return self._data_and_metadata() |
|
1189 | 1186 | |
|
1190 | 1187 | def _find_ext(self, s): |
General Comments 0
You need to be logged in to leave comments.
Login now