diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2015-01-21 19:15:38 +0100 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2015-01-21 19:15:38 +0100 |
commit | c62eeeb71271683926a3555c4a871b0987ab3c95 (patch) | |
tree | 2f5daca10a9d13d0c47a2ebbb54b0b22c6f32e69 /kcc/image.py | |
parent | Replaced os.walk (diff) | |
download | kcc-c62eeeb71271683926a3555c4a871b0987ab3c95.tar.gz kcc-c62eeeb71271683926a3555c4a871b0987ab3c95.tar.bz2 kcc-c62eeeb71271683926a3555c4a871b0987ab3c95.zip |
Re-enabled MCD support
Diffstat (limited to '')
-rwxr-xr-x | kcc/image.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/kcc/image.py b/kcc/image.py index 2523c06..8ba8f09 100755 --- a/kcc/image.py +++ b/kcc/image.py @@ -508,7 +508,7 @@ class Cover: def processExternal(self): self.image = self.image.convert('RGB') self.image.thumbnail(self.options.profileData[1], Image.LANCZOS) - self.save(True) + self.save() def trim(self): bg = Image.new(self.image.mode, self.image.size, self.image.getpixel((0, 0))) @@ -520,15 +520,8 @@ class Cover: else: return self.image - def save(self, external=False): - if external: - source = self.options.remoteCovers[self.tomeNumber].split('/')[-1] - else: - source = self.source + def save(self): try: - if os.path.splitext(source)[1].lower() == '.png': - self.image.save(self.target, "PNG", optimize=1) - else: - self.image.save(self.target, "JPEG", optimize=1, quality=80) + self.image.save(self.target, "JPEG", optimize=1, quality=80) except IOError: raise RuntimeError('Failed to save cover') |