diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2017-10-13 10:41:45 +0200 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2017-10-13 10:41:45 +0200 |
commit | f44bf5993ea3716abf02488f1c13df49f8279f84 (patch) | |
tree | 4ebcf5938a491c9746f7fea07e44df4bf345820a /kindlecomicconverter | |
parent | Added Oasis 2 profile (close #249) (diff) | |
download | kcc-f44bf5993ea3716abf02488f1c13df49f8279f84.tar.gz kcc-f44bf5993ea3716abf02488f1c13df49f8279f84.tar.bz2 kcc-f44bf5993ea3716abf02488f1c13df49f8279f84.zip |
Fixed HQ mode upscaling (close #248)
Diffstat (limited to 'kindlecomicconverter')
-rw-r--r-- | kindlecomicconverter/KCC_gui.py | 2 | ||||
-rwxr-xr-x | kindlecomicconverter/comic2ebook.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/kindlecomicconverter/KCC_gui.py b/kindlecomicconverter/KCC_gui.py index a97ac7b..9191a49 100644 --- a/kindlecomicconverter/KCC_gui.py +++ b/kindlecomicconverter/KCC_gui.py @@ -620,7 +620,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow): if value == 2: if profile['Label'] in ['KV', 'KO']: self.addMessage('This option is intended for older Kindle models.', 'warning') - self.addMessage('It will not increase quality on a device with 300 ppi screen.', 'warning') + self.addMessage('On this device, quality improvement will be negligible.', 'warning') GUI.upscaleBox.setEnabled(False) GUI.upscaleBox.setChecked(True) else: diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py index 3cf38f4..459695d 100755 --- a/kindlecomicconverter/comic2ebook.py +++ b/kindlecomicconverter/comic2ebook.py @@ -104,7 +104,7 @@ def buildHTML(path, imgfile, imgfilepath): htmlfile = os.path.join(htmlpath, filename[0] + '.xhtml') imgsize = Image.open(os.path.join(head, "Images", postfix, imgfile)).size if options.hq: - imgsizeframe = deviceres + imgsizeframe = (int(imgsize[0] // 1.5), int(imgsize[1] // 1.5)) else: imgsizeframe = imgsize f = open(htmlfile, "w", encoding='UTF-8') @@ -118,7 +118,7 @@ def buildHTML(path, imgfile, imgfilepath): "content=\"width=" + str(imgsize[0]) + ", height=" + str(imgsize[1]) + "\"/>\n" "</head>\n", "<body style=\"" + additionalStyle + "\">\n", - "<div style=\"text-align:center;top:" + getTopMargin(deviceres, imgsize) + "%;\">\n", + "<div style=\"text-align:center;top:" + getTopMargin(deviceres, imgsizeframe) + "%;\">\n", "<img width=\"" + str(imgsizeframe[0]) + "\" height=\"" + str(imgsizeframe[1]) + "\" ", "src=\"", "../" * backref, "Images/", postfix, imgfile, "\"/>\n</div>\n"]) if options.iskindle and options.panelview: |