diff options
| author | jvoisin | 2015-07-25 17:14:23 +0200 |
|---|---|---|
| committer | jvoisin | 2015-07-25 17:14:23 +0200 |
| commit | 6ba3e3f20d7d52895bc44f9fc35b068cfce47133 (patch) | |
| tree | 15df2aca17d56d941c6376ef729e0c1fea4c396f /libmat/images.py | |
| parent | 85e6279d16af063e5150c7cf4bd491185b8ae788 (diff) | |
_MASSIVE_ pep8 revamp
Thank you so much PyCharm
Diffstat (limited to 'libmat/images.py')
| -rw-r--r-- | libmat/images.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libmat/images.py b/libmat/images.py index 67c710f..0c4f3e0 100644 --- a/libmat/images.py +++ b/libmat/images.py | |||
| @@ -1,23 +1,23 @@ | |||
| 1 | ''' Takes care about pictures formats | 1 | """ Takes care about pictures formats |
| 2 | 2 | ||
| 3 | References: | 3 | References: |
| 4 | - JFIF: http://www.ecma-international.org/publications/techreports/E-TR-098.htm | 4 | - JFIF: http://www.ecma-international.org/publications/techreports/E-TR-098.htm |
| 5 | - PNG: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/PNG.html | 5 | - PNG: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/PNG.html |
| 6 | - PNG: http://www.w3.org/TR/PNG-Chunks.html | 6 | - PNG: http://www.w3.org/TR/PNG-Chunks.html |
| 7 | ''' | 7 | """ |
| 8 | 8 | ||
| 9 | import parser | 9 | import parser |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | class JpegStripper(parser.GenericParser): | 12 | class JpegStripper(parser.GenericParser): |
| 13 | ''' Represents a jpeg file. | 13 | """ Represents a jpeg file. |
| 14 | Custom Huffman and Quantization tables | 14 | Custom Huffman and Quantization tables |
| 15 | are stripped: they may leak | 15 | are stripped: they may leak |
| 16 | some info, and the quality loss is minor. | 16 | some info, and the quality loss is minor. |
| 17 | ''' | 17 | """ |
| 18 | def _should_remove(self, field): | 18 | def _should_remove(self, field): |
| 19 | ''' Return True if the field is compromising | 19 | """ Return True if the field is compromising |
| 20 | ''' | 20 | """ |
| 21 | field_list = frozenset([ | 21 | field_list = frozenset([ |
| 22 | 'start_image', # start of the image | 22 | 'start_image', # start of the image |
| 23 | 'app0', # JFIF data | 23 | 'app0', # JFIF data |
| @@ -35,11 +35,11 @@ class JpegStripper(parser.GenericParser): | |||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | class PngStripper(parser.GenericParser): | 37 | class PngStripper(parser.GenericParser): |
| 38 | ''' Represents a png file | 38 | """ Represents a png file |
| 39 | ''' | 39 | """ |
| 40 | def _should_remove(self, field): | 40 | def _should_remove(self, field): |
| 41 | ''' Return True if the field is compromising | 41 | """ Return True if the field is compromising |
| 42 | ''' | 42 | """ |
| 43 | field_list = frozenset([ | 43 | field_list = frozenset([ |
| 44 | 'id', | 44 | 'id', |
| 45 | 'header', # PNG header | 45 | 'header', # PNG header |
