diff options
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 | ||
