diff options
Diffstat (limited to 'lib/images.py')
| -rw-r--r-- | lib/images.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/images.py b/lib/images.py index df3d256..9fa9999 100644 --- a/lib/images.py +++ b/lib/images.py | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | ''' | ||
| 2 | Takes care about pictures formats | ||
| 3 | ''' | ||
| 4 | |||
| 1 | import parser | 5 | import parser |
| 2 | 6 | ||
| 3 | 7 | ||
| @@ -6,6 +10,9 @@ class JpegStripper(parser.GenericParser): | |||
| 6 | Represents a .jpeg file | 10 | Represents a .jpeg file |
| 7 | ''' | 11 | ''' |
| 8 | def _should_remove(self, field): | 12 | def _should_remove(self, field): |
| 13 | ''' | ||
| 14 | return True if the field is compromizing | ||
| 15 | ''' | ||
| 9 | if field.name.startswith('comment'): | 16 | if field.name.startswith('comment'): |
| 10 | return True | 17 | return True |
| 11 | elif field.name in ("photoshop", "exif", "adobe"): | 18 | elif field.name in ("photoshop", "exif", "adobe"): |
| @@ -19,6 +26,9 @@ class PngStripper(parser.GenericParser): | |||
| 19 | Represents a .png file | 26 | Represents a .png file |
| 20 | ''' | 27 | ''' |
| 21 | def _should_remove(self, field): | 28 | def _should_remove(self, field): |
| 29 | ''' | ||
| 30 | return True if the field is compromizing | ||
| 31 | ''' | ||
| 22 | if field.name.startswith("text["): | 32 | if field.name.startswith("text["): |
| 23 | return True | 33 | return True |
| 24 | elif field.name is "time": | 34 | elif field.name is "time": |
