diff options
| author | jvoisin | 2011-06-20 01:25:33 +0200 |
|---|---|---|
| committer | jvoisin | 2011-06-20 01:25:33 +0200 |
| commit | 52f2fedd5d73807d42ba5c397c3e4c5348b47a47 (patch) | |
| tree | 09070e23428f3f72e4a95da8df33520adacbf01f /lib/images.py | |
| parent | de5917e5f01374bb1a647f49ae85283241a2bea9 (diff) | |
Introduction of a nice separation of functions/class in differents files
Diffstat (limited to 'lib/images.py')
| -rw-r--r-- | lib/images.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/images.py b/lib/images.py new file mode 100644 index 0000000..21229c2 --- /dev/null +++ b/lib/images.py | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | import parser | ||
| 2 | |||
| 3 | class JpegStripper(parser.Generic_parser): | ||
| 4 | def _should_remove(self, field): | ||
| 5 | if field.name.startswith('comment'): | ||
| 6 | return True | ||
| 7 | elif field.name in ("photoshop", "exif", "adobe"): | ||
| 8 | return True | ||
| 9 | else: | ||
| 10 | return False | ||
| 11 | |||
| 12 | class PngStripper(parser.Generic_parser): | ||
| 13 | def _should_remove(self, field): | ||
| 14 | if field.name in ('comment'): | ||
| 15 | return True | ||
| 16 | else: | ||
| 17 | return False | ||
