1
0
mirror of https://github.com/ciromattia/kcc synced 2026-02-18 02:01:08 +00:00

Updated GUI

Plus small notquantize tweaks.
This commit is contained in:
Paweł Jastrzębski
2013-03-05 23:41:48 +01:00
parent b162425e52
commit 718af10be7
3 changed files with 30 additions and 39 deletions

View File

@@ -111,12 +111,12 @@ class ComicPage:
raise RuntimeError('Cannot read image file %s' % source)
self.image = self.image.convert('RGB')
def saveToDir(self, targetdir):
def saveToDir(self, targetdir, notquantize):
filename = os.path.basename(self.origFileName)
try:
self.image = self.image.convert('L') # convert to grayscale
os.remove(os.path.join(targetdir,filename))
if options.notquantize:
if notquantize:
self.image.save(os.path.join(targetdir, os.path.splitext(filename)[0] + ".jpg"), "JPEG")
else:
self.image.save(os.path.join(targetdir, os.path.splitext(filename)[0] + ".png"), "PNG")