diff options
| author | Vincent Deffontaines | 2025-03-18 22:11:27 +0100 |
|---|---|---|
| committer | jvoisin | 2025-03-18 22:20:17 +0100 |
| commit | 2b58eece509c22a692f4de2512ec41c00e1d2728 (patch) | |
| tree | c74baaf6570b8721eff0ef8e8ccbf7d07fc9e05b /libmat2 | |
| parent | 29f404bce34706f1902659a8aa713d9c2570cc60 (diff) | |
Add webp support
Diffstat (limited to 'libmat2')
| -rw-r--r-- | libmat2/images.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libmat2/images.py b/libmat2/images.py index bca1e74..317a9e3 100644 --- a/libmat2/images.py +++ b/libmat2/images.py | |||
| @@ -196,3 +196,15 @@ class HEICParser(exiftool.ExiftoolParser): | |||
| 196 | 196 | ||
| 197 | def remove_all(self) -> bool: | 197 | def remove_all(self) -> bool: |
| 198 | return self._lightweight_cleanup() | 198 | return self._lightweight_cleanup() |
| 199 | |||
| 200 | class WEBPParser(GdkPixbufAbstractParser): | ||
| 201 | mimetypes = {'image/webp'} | ||
| 202 | meta_allowlist = {'SourceFile', 'ExifToolVersion', 'FileName', | ||
| 203 | 'Directory', 'FileSize', 'FileModifyDate', | ||
| 204 | 'FileAccessDate', "FileInodeChangeDate", | ||
| 205 | 'FilePermissions', 'FileType', 'FileTypeExtension', | ||
| 206 | 'MIMEType', 'ImageWidth', 'ImageSize', 'BitsPerSample', | ||
| 207 | 'ColorComponents', 'EncodingProcess', 'JFIFVersion', | ||
| 208 | 'ResolutionUnit', 'XResolution', 'YCbCrSubSampling', | ||
| 209 | 'YResolution', 'Megapixels', 'ImageHeight', 'Orientation', | ||
| 210 | 'HorizontalScale', 'VerticalScale', 'VP8Version'} | ||
