(data)
| 157 | |
| 158 | @staticmethod |
| 159 | def GetAnimationFormat(data): |
| 160 | try: |
| 161 | from PIL import Image |
| 162 | from io import BytesIO |
| 163 | a = BytesIO(data) |
| 164 | img = Image.open(a) |
| 165 | |
| 166 | format = "" |
| 167 | if getattr(img, "is_animated", ""): |
| 168 | format = img.format |
| 169 | a.close() |
| 170 | return format |
| 171 | except Exception as es: |
| 172 | Log.Error(es) |
| 173 | return "" |
| 174 | |
| 175 | @staticmethod |
| 176 | def GetPictureSize(data): |
no test coverage detected