diff options
| author | jvoisin | 2018-07-06 00:49:17 +0200 |
|---|---|---|
| committer | jvoisin | 2018-07-06 00:49:17 +0200 |
| commit | 3d80f9752481b8967616698bb3c0c014e6f1527a (patch) | |
| tree | 65dca424d2826daf0214c4e3a731c7a741ee1bc7 /libmat2 | |
| parent | 53271495f74bde7fde2329b7c5c938654a36b7dc (diff) | |
Simplify BMP handling
Diffstat (limited to 'libmat2')
| -rw-r--r-- | libmat2/harmless.py | 2 | ||||
| -rw-r--r-- | libmat2/images.py | 16 |
2 files changed, 1 insertions, 17 deletions
diff --git a/libmat2/harmless.py b/libmat2/harmless.py index 9032caf..336873c 100644 --- a/libmat2/harmless.py +++ b/libmat2/harmless.py | |||
| @@ -5,7 +5,7 @@ from . import abstract | |||
| 5 | 5 | ||
| 6 | class HarmlessParser(abstract.AbstractParser): | 6 | class HarmlessParser(abstract.AbstractParser): |
| 7 | """ This is the parser for filetypes that do not contain metadata. """ | 7 | """ This is the parser for filetypes that do not contain metadata. """ |
| 8 | mimetypes = {'text/plain', } | 8 | mimetypes = {'text/plain', 'image/x-ms-bmp'} |
| 9 | 9 | ||
| 10 | def get_meta(self) -> Dict[str, str]: | 10 | def get_meta(self) -> Dict[str, str]: |
| 11 | return dict() | 11 | return dict() |
diff --git a/libmat2/images.py b/libmat2/images.py index 74533b5..311186d 100644 --- a/libmat2/images.py +++ b/libmat2/images.py | |||
| @@ -110,19 +110,3 @@ class TiffParser(GdkPixbufAbstractParser): | |||
| 110 | 'FilePermissions', 'FileSize', 'FileType', | 110 | 'FilePermissions', 'FileSize', 'FileType', |
| 111 | 'FileTypeExtension', 'ImageHeight', 'ImageSize', | 111 | 'FileTypeExtension', 'ImageHeight', 'ImageSize', |
| 112 | 'ImageWidth', 'MIMEType', 'Megapixels', 'SourceFile'} | 112 | 'ImageWidth', 'MIMEType', 'Megapixels', 'SourceFile'} |
| 113 | |||
| 114 | |||
| 115 | class BMPParser(GdkPixbufAbstractParser): | ||
| 116 | _type = 'bmp' | ||
| 117 | mimetypes = {'image/x-ms-bmp'} | ||
| 118 | meta_whitelist = {'SourceFile', 'ExifToolVersion', 'FileName', 'Directory', | ||
| 119 | 'FileSize', 'FileModifyDate', 'FileAccessDate', | ||
| 120 | 'FileInodeChangeDate', 'FilePermissions', 'FileType', | ||
| 121 | 'FileTypeExtension', 'MIMEType', 'BMPVersion', | ||
| 122 | 'ImageWidth', 'ImageHeight', 'Planes', 'BitDepth', | ||
| 123 | 'Compression', 'ImageLength', 'PixelsPerMeterX', | ||
| 124 | 'PixelsPerMeterY', 'NumColors', 'NumImportantColors', | ||
| 125 | 'RedMask', 'GreenMask', 'BlueMask', 'AlphaMask', | ||
| 126 | 'ColorSpace', 'RedEndpoint', 'GreenEndpoint', | ||
| 127 | 'BlueEndpoint', 'GammaRed', 'GammaGreen', 'GammaBlue', | ||
| 128 | 'ImageSize', 'Megapixels'} | ||
