diff options
| author | jvoisin | 2018-10-23 16:14:21 +0200 |
|---|---|---|
| committer | jvoisin | 2018-10-23 16:22:11 +0200 |
| commit | f1a071d460507fd1bb1721deafd2a8d9f88f5b05 (patch) | |
| tree | e17067895ef1fc9b91b00c0ba56d2e86975ceef1 /libmat2/images.py | |
| parent | 38df679a88a19db3a4a82fdb8e20a42c9a53d1a1 (diff) | |
Implement lightweight cleaning for png and tiff
Diffstat (limited to 'libmat2/images.py')
| -rw-r--r-- | libmat2/images.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libmat2/images.py b/libmat2/images.py index ad80892..03cecd3 100644 --- a/libmat2/images.py +++ b/libmat2/images.py | |||
| @@ -35,6 +35,8 @@ class PNGParser(exiftool.ExiftoolParser): | |||
| 35 | raise ValueError | 35 | raise ValueError |
| 36 | 36 | ||
| 37 | def remove_all(self) -> bool: | 37 | def remove_all(self) -> bool: |
| 38 | if self.lightweight_cleaning: | ||
| 39 | return self._lightweight_cleanup() | ||
| 38 | surface = cairo.ImageSurface.create_from_png(self.filename) | 40 | surface = cairo.ImageSurface.create_from_png(self.filename) |
| 39 | surface.write_to_png(self.output_filename) | 41 | surface.write_to_png(self.output_filename) |
| 40 | return True | 42 | return True |
