summaryrefslogtreecommitdiff
path: root/libmat2
diff options
context:
space:
mode:
authorjvoisin2019-02-03 21:01:58 +0100
committerjvoisin2019-02-03 21:01:58 +0100
commit433609f8eadc05ec6aceeb2b71951cc6db318d81 (patch)
tree6030cd6743f29c30fc524128a957d8ec4ad82d78 /libmat2
parente8c1bb0e3c4cae579e81ce6a4b01b829900ff922 (diff)
Implement .gif support
Diffstat (limited to 'libmat2')
-rw-r--r--libmat2/images.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/libmat2/images.py b/libmat2/images.py
index 153a83d..dd3be53 100644
--- a/libmat2/images.py
+++ b/libmat2/images.py
@@ -42,6 +42,21 @@ class PNGParser(exiftool.ExiftoolParser):
42 return True 42 return True
43 43
44 44
45class GIFParser(exiftool.ExiftoolParser):
46 mimetypes = {'image/gif'}
47 meta_whitelist = {'AnimationIterations', 'BackgroundColor', 'BitsPerPixel',
48 'ColorResolutionDepth', 'Directory', 'Duration',
49 'ExifToolVersion', 'FileAccessDate',
50 'FileInodeChangeDate', 'FileModifyDate', 'FileName',
51 'FilePermissions', 'FileSize', 'FileType',
52 'FileTypeExtension', 'FrameCount', 'GIFVersion',
53 'HasColorMap', 'ImageHeight', 'ImageSize', 'ImageWidth',
54 'MIMEType', 'Megapixels', 'SourceFile',}
55
56 def remove_all(self) -> bool:
57 return self._lightweight_cleanup()
58
59
45class GdkPixbufAbstractParser(exiftool.ExiftoolParser): 60class GdkPixbufAbstractParser(exiftool.ExiftoolParser):
46 """ GdkPixbuf can handle a lot of surfaces, so we're rending images on it, 61 """ GdkPixbuf can handle a lot of surfaces, so we're rending images on it,
47 this has the side-effect of completely removing metadata. 62 this has the side-effect of completely removing metadata.