diff options
| author | jvoisin | 2018-04-16 22:27:29 +0200 |
|---|---|---|
| committer | jvoisin | 2018-04-16 22:27:29 +0200 |
| commit | e34bc19f7126b80764a4c8747a7a2a1636289396 (patch) | |
| tree | 577ce5fc2de9c82f50bc70030b9ad30265b0622e /src/images.py | |
| parent | 4b92bef2193bb02e914eb7aedc04f22468248f9c (diff) | |
Add support for BMP
To be completely honest, BMP have no metadata,
but we still add it, just in caseā¢
Diffstat (limited to 'src/images.py')
| -rw-r--r-- | src/images.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/images.py b/src/images.py index 06f3e22..707207b 100644 --- a/src/images.py +++ b/src/images.py | |||
| @@ -75,3 +75,17 @@ class TiffParser(GdkPixbufAbstractParser): | |||
| 75 | 'FileTypeExtension', 'ImageHeight', 'ImageSize', 'ImageWidth', | 75 | 'FileTypeExtension', 'ImageHeight', 'ImageSize', 'ImageWidth', |
| 76 | 'MIMEType', 'Megapixels', 'SourceFile'} | 76 | 'MIMEType', 'Megapixels', 'SourceFile'} |
| 77 | 77 | ||
| 78 | |||
| 79 | class BMPParser(GdkPixbufAbstractParser): | ||
| 80 | mimetypes = {'image/bmp', 'image/x-ms-bmp'} | ||
| 81 | meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName', 'Directory', | ||
| 82 | 'FileSize', 'FileModifyDate', 'FileAccessDate', | ||
| 83 | 'FileInodeChangeDate', 'FilePermissions', 'FileType', | ||
| 84 | 'FileTypeExtension', 'MIMEType', 'BMPVersion', 'ImageWidth', | ||
| 85 | 'ImageHeight', 'Planes', 'BitDepth', 'Compression', 'ImageLength', | ||
| 86 | 'PixelsPerMeterX', 'PixelsPerMeterY', 'NumColors', | ||
| 87 | 'NumImportantColors', 'RedMask', 'GreenMask', 'BlueMask', | ||
| 88 | 'AlphaMask', 'ColorSpace', 'RedEndpoint', 'GreenEndpoint', | ||
| 89 | 'BlueEndpoint', 'GammaRed', 'GammaGreen', 'GammaBlue', 'ImageSize', | ||
| 90 | 'Megapixels'} | ||
| 91 | |||
