summaryrefslogtreecommitdiff
path: root/libmat/exiftool.py
diff options
context:
space:
mode:
authorjvoisin2015-02-22 10:10:50 +0100
committerjvoisin2015-02-22 10:15:34 +0100
commit79ce29a7d5e41bb3bb2499bc7eb99164c423aa1d (patch)
tree3c8515874cfb9e0469bf0ea32d18b2fee1a66047 /libmat/exiftool.py
parent655dda11a1eaf740573f019c3e734ef202db2345 (diff)
Preliminary implementation of PIL for images.
PIL (Python Image Library) is used to open, then save images, in order to remove unknown metadata.
Diffstat (limited to '')
-rw-r--r--libmat/exiftool.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmat/exiftool.py b/libmat/exiftool.py
index 9e38f04..2c2a2b8 100644
--- a/libmat/exiftool.py
+++ b/libmat/exiftool.py
@@ -1,11 +1,13 @@
1''' Care about images with help of the amazing (perl) library Exiftool. 1''' Care about images with help of the amazing (perl) library Exiftool.
2''' 2'''
3 3
4import parser
5import subprocess 4import subprocess
6 5
6import parser
7import pillow
8
7 9
8class ExiftoolStripper(parser.GenericParser): 10class ExiftoolStripper(parser.GenericParser, pillow.PillowStripper):
9 ''' A generic stripper class using exiftool as backend 11 ''' A generic stripper class using exiftool as backend
10 ''' 12 '''
11 13
@@ -25,6 +27,7 @@ class ExiftoolStripper(parser.GenericParser):
25 def remove_all(self): 27 def remove_all(self):
26 ''' Remove all metadata with help of exiftool 28 ''' Remove all metadata with help of exiftool
27 ''' 29 '''
30 self.open_and_save()
28 try: 31 try:
29 if self.backup: 32 if self.backup:
30 self.create_backup_copy() 33 self.create_backup_copy()