1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-11 00:36:33 +00:00

disable default gamma correction/darkening of 1.8 (1.0 is disabled) (#1030)

* disable default gamma correction of 1.8 to 1.0 (disabled)

* update gamma tooltip

* custom gamma
This commit is contained in:
Alex Xu
2025-10-20 11:42:59 -07:00
committed by GitHub
parent 80ea17ff02
commit 06194b33ad
4 changed files with 76 additions and 76 deletions

View File

@@ -95,7 +95,7 @@
</property>
<property name="icon">
<iconset resource="KCC.qrc">
<normaloff>:/Brand/icons/kofi_symbol.png</normaloff>:/Other/icons/kofi_symbol.png</iconset>
<normaloff>:/Brand/icons/kofi_symbol.png</normaloff>:/Brand/icons/kofi_symbol.png</iconset>
</property>
<property name="iconSize">
<size>
@@ -465,7 +465,7 @@
<item row="2" column="2">
<widget class="QCheckBox" name="gammaBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p style='white-space:pre'&gt;Disable automatic gamma correction.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set a custom gamma correction.&lt;/p&gt;&lt;p&gt;1.0 is default (disabled).&lt;br/&gt;&amp;lt; 1.0 makes the image brighter.&lt;br/&gt;&amp;gt; 1.0 makes the image darker. &lt;/p&gt;&lt;p&gt;1.8 was the default in KCC 9.1.0 and earlier.&lt;/p&gt;&lt;p&gt;Use if you want to make midtones darker.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Custom gamma</string>
@@ -756,7 +756,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Set the most common dark pixel value to be the black point for leveling on a page by page basis.&lt;/p&gt;&lt;p&gt;Skipped for any images that were originally color.&lt;/p&gt;&lt;p&gt;Use only if default autocontrast still results in very gray faded blacks. &lt;/p&gt;&lt;p&gt;Reccomended to use with Custom Gamma = 1.0 (Disabled).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Aggressive Black Point</string>
<string>Extreme Black Point</string>
</property>
</widget>
</item>

View File

@@ -13767,59 +13767,59 @@ qt_resource_struct = b"\
\x00\x00\x00h\x00\x02\x00\x00\x00\x04\x00\x00\x00\x08\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x02<\x00\x00\x00\x00\x00\x01\x00\x02\xb4\x18\
\x00\x00\x01\x99\xab\x9faO\
\x00\x00\x01\x88;p\xbcB\
\x00\x00\x02z\x00\x00\x00\x00\x00\x01\x00\x03\x08\xb2\
\x00\x00\x01\x99\xab\x9faM\
\x00\x00\x01\x88;p\xbcB\
\x00\x00\x02f\x00\x00\x00\x00\x00\x01\x00\x02\xde\xb7\
\x00\x00\x01\x99\xab\x9faM\
\x00\x00\x01\x88;p\xbcB\
\x00\x00\x02R\x00\x00\x00\x00\x00\x01\x00\x02\xd3T\
\x00\x00\x01\x99\xab\x9faN\
\x00\x00\x01\x89\x89D9.\
\x00\x00\x00h\x00\x02\x00\x00\x00\x04\x00\x00\x00\x0d\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x01\x22\x00\x00\x00\x00\x00\x01\x00\x01\xad\xc2\
\x00\x00\x01\x99\xab\x9faO\
\x00\x00\x01\x88;p\xbcB\
\x00\x00\x018\x00\x00\x00\x00\x00\x01\x00\x01\xb7\x1a\
\x00\x00\x01\x99\xab\x9faP\
\x00\x00\x01\x98\x8a\xa4\xaa\xe2\
\x00\x00\x01\x08\x00\x00\x00\x00\x00\x01\x00\x01\xa2\xbb\
\x00\x00\x01\x99\xab\x9faN\
\x00\x00\x01\x88;p\xbcB\
\x00\x00\x01L\x00\x00\x00\x00\x00\x01\x00\x01\xbf0\
\x00\x00\x01\x99\xab\x9faO\
\x00\x00\x01\x88;p\xbcB\
\x00\x00\x00h\x00\x02\x00\x00\x00\x03\x00\x00\x00\x12\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x02\xbe\x00\x00\x00\x00\x00\x01\x00\x03:\xfe\
\x00\x00\x01\x99\xab\x9fa\x5c\
\x00\x00\x01\x88;p\xbcJ\
\x00\x00\x02\x90\x00\x00\x00\x00\x00\x01\x00\x03%\x01\
\x00\x00\x01\x99\xab\x9faZ\
\x00\x00\x01\x88;p\xbcI\
\x00\x00\x02\xa6\x00\x00\x00\x00\x00\x01\x00\x03.^\
\x00\x00\x01\x99\xab\x9faZ\
\x00\x00\x01\x88;p\xbcI\
\x00\x00\x00h\x00\x02\x00\x00\x00\x07\x00\x00\x00\x16\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x01\x98\x00\x00\x00\x00\x00\x01\x00\x01\xd5\xdc\
\x00\x00\x01\x99\xab\x9fa]\
\x00\x00\x01\x88;p\xbcJ\
\x00\x00\x01\xae\x00\x00\x00\x00\x00\x01\x00\x01\xfe\x84\
\x00\x00\x01\x99\xab\x9faZ\
\x00\x00\x01\x88;p\xbcI\
\x00\x00\x02\x10\x00\x00\x00\x00\x00\x01\x00\x02WX\
\x00\x00\x01\x99\xab\x9fa[\
\x00\x00\x01\x94\xb4\xd4\xf0a\
\x00\x00\x01\xf6\x00\x00\x00\x00\x00\x01\x00\x02\x12\x11\
\x00\x00\x01\x99\xab\x9faZ\
\x00\x00\x01\x88;p\xbcH\
\x00\x00\x01\x80\x00\x00\x00\x00\x00\x01\x00\x01\xd1}\
\x00\x00\x01\x99\xab\x9faT\
\x00\x00\x01\x88;p\xbcF\
\x00\x00\x01d\x00\x00\x00\x00\x00\x01\x00\x01\xc5\x14\
\x00\x00\x01\x99\xab\x9faY\
\x00\x00\x01\x88;p\xbcH\
\x00\x00\x01\xd0\x00\x00\x00\x00\x00\x01\x00\x02\x07\xdb\
\x00\x00\x01\x99\xab\x9faY\
\x00\x00\x01\x88;p\xbcH\
\x00\x00\x00h\x00\x02\x00\x00\x00\x03\x00\x00\x00\x1e\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x01\x00\x01~z\
\x00\x00\x01\x99\xab\x9fa[\
\x00\x00\x01\x98\x8a\xa4\xaa\xe2\
\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x01\x00\x01\x1d\x90\
\x00\x00\x01\x99\xab\x9faM\
\x00\x00\x01\x9a\x02\xcf\x8cb\
\x00\x00\x00\xbe\x00\x00\x00\x00\x00\x01\x00\x01=\xd0\
\x00\x00\x01\x99\xab\x9faN\
\x00\x00\x01\x9a\x02\xcf\x8cc\
\x00\x00\x00h\x00\x02\x00\x00\x00\x01\x00\x00\x00\x22\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00x\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x99\xab\x9faX\
\x00\x00\x01\x88;p\xbcH\
"
def qInitResources():

View File

@@ -279,20 +279,11 @@ class Ui_mainWindow(object):
self.gridLayout_2.addWidget(self.fileFusionBox, 6, 0, 1, 1)
self.authorEdit = QLineEdit(self.optionWidget)
self.authorEdit.setObjectName(u"authorEdit")
self.titleEdit = QLineEdit(self.optionWidget)
self.titleEdit.setObjectName(u"titleEdit")
sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed)
sizePolicy3.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(self.authorEdit.sizePolicy().hasHeightForWidth())
self.authorEdit.setSizePolicy(sizePolicy3)
self.authorEdit.setFocusPolicy(Qt.FocusPolicy.ClickFocus)
self.authorEdit.setClearButtonEnabled(False)
self.gridLayout_2.addWidget(self.authorEdit, 0, 1, 1, 1)
self.titleEdit = QLineEdit(self.optionWidget)
self.titleEdit.setObjectName(u"titleEdit")
sizePolicy3.setHeightForWidth(self.titleEdit.sizePolicy().hasHeightForWidth())
self.titleEdit.setSizePolicy(sizePolicy3)
self.titleEdit.setFocusPolicy(Qt.FocusPolicy.ClickFocus)
@@ -300,6 +291,15 @@ class Ui_mainWindow(object):
self.gridLayout_2.addWidget(self.titleEdit, 0, 0, 1, 1)
self.authorEdit = QLineEdit(self.optionWidget)
self.authorEdit.setObjectName(u"authorEdit")
sizePolicy3.setHeightForWidth(self.authorEdit.sizePolicy().hasHeightForWidth())
self.authorEdit.setSizePolicy(sizePolicy3)
self.authorEdit.setFocusPolicy(Qt.FocusPolicy.ClickFocus)
self.authorEdit.setClearButtonEnabled(False)
self.gridLayout_2.addWidget(self.authorEdit, 0, 1, 1, 1)
self.rotateFirstBox = QCheckBox(self.optionWidget)
self.rotateFirstBox.setObjectName(u"rotateFirstBox")
@@ -501,7 +501,7 @@ class Ui_mainWindow(object):
def retranslateUi(self, mainWindow):
mainWindow.setWindowTitle(QCoreApplication.translate("mainWindow", u"Kindle Comic Converter", None))
#if QT_CONFIG(tooltip)
self.jobList.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>Double click on source to open metadata editor.</p></body></html>", None))
self.jobList.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>Double click on source to open it in metadata editor.</p></body></html>", None))
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(tooltip)
self.editorButton.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p style='white-space:pre'>Shift+Click to edit directory.</p></body></html>", None))
@@ -552,7 +552,7 @@ class Ui_mainWindow(object):
self.preserveMarginLabel.setText(QCoreApplication.translate("mainWindow", u"Preserve Margin %", None))
self.croppingPowerLabel.setText(QCoreApplication.translate("mainWindow", u"Cropping power:", None))
#if QT_CONFIG(tooltip)
self.gammaBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p style='white-space:pre'>Disable automatic gamma correction.</p></body></html>", None))
self.gammaBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>Set a custom gamma correction.</p><p>1.0 is default (disabled).<br/>&lt; 1.0 makes the image brighter.<br/>&gt; 1.0 makes the image darker. </p><p>1.8 was the default in KCC 9.1.0 and earlier.</p><p>Use if you want to make midtones darker.</p></body></html>", None))
#endif // QT_CONFIG(tooltip)
self.gammaBox.setText(QCoreApplication.translate("mainWindow", u"Custom gamma", None))
#if QT_CONFIG(tooltip)
@@ -571,14 +571,14 @@ class Ui_mainWindow(object):
self.fileFusionBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>Combines all selected files into a single file. (Helpful for combining chapters into volumes.)</p></body></html>", None))
#endif // QT_CONFIG(tooltip)
self.fileFusionBox.setText(QCoreApplication.translate("mainWindow", u"File Fusion", None))
#if QT_CONFIG(tooltip)
self.titleEdit.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>Default Title</p></body></html>", None))
#endif // QT_CONFIG(tooltip)
self.titleEdit.setPlaceholderText(QCoreApplication.translate("mainWindow", u"Default Title", None))
#if QT_CONFIG(tooltip)
self.authorEdit.setToolTip(QCoreApplication.translate("mainWindow", u"Default Author is KCC", None))
#endif // QT_CONFIG(tooltip)
self.authorEdit.setPlaceholderText(QCoreApplication.translate("mainWindow", u"Default Author", None))
#if QT_CONFIG(tooltip)
self.titleEdit.setToolTip(QCoreApplication.translate("mainWindow", u"Default Title is based on filename, directory name or metadata", None))
#endif // QT_CONFIG(tooltip)
self.titleEdit.setPlaceholderText(QCoreApplication.translate("mainWindow", u"Default Title", None))
#if QT_CONFIG(tooltip)
self.rotateFirstBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>When the spread splitter option is partially checked,</p><p><span style=\" font-weight:600; text-decoration: underline;\">Unchecked - Rotate Last<br/></span>Put the rotated 2 page spread after the split spreads.</p><p><span style=\" font-weight:600; text-decoration: underline;\">Checked - Rotate First<br/></span>Put the rotated 2 page spread before the split spreads.</p></body></html>", None))
#endif // QT_CONFIG(tooltip)
@@ -650,7 +650,7 @@ class Ui_mainWindow(object):
#if QT_CONFIG(tooltip)
self.autoLevelBox.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>Set the most common dark pixel value to be the black point for leveling on a page by page basis.</p><p>Skipped for any images that were originally color.</p><p>Use only if default autocontrast still results in very gray faded blacks. </p><p>Reccomended to use with Custom Gamma = 1.0 (Disabled).</p></body></html>", None))
#endif // QT_CONFIG(tooltip)
self.autoLevelBox.setText(QCoreApplication.translate("mainWindow", u"Aggressive Black Point", None))
self.autoLevelBox.setText(QCoreApplication.translate("mainWindow", u"Extreme Black Point", None))
self.gammaLabel.setText(QCoreApplication.translate("mainWindow", u"Gamma: Auto", None))
#if QT_CONFIG(tooltip)
self.chunkSizeWidget.setToolTip(QCoreApplication.translate("mainWindow", u"<html><head/><body><p>Warning: chunk size greater than default may cause<br/>performance/battery issues, especially on older devices.</p></body></html>", None))

View File

@@ -85,22 +85,22 @@ class ProfileData:
]
ProfilesKindleEBOK = {
'K1': ("Kindle 1", (600, 670), Palette4, 1.8),
'K2': ("Kindle 2", (600, 670), Palette15, 1.8),
'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8),
'K34': ("Kindle Keyboard/Touch", (600, 800), Palette16, 1.8),
'K57': ("Kindle 5/7", (600, 800), Palette16, 1.8),
'KPW': ("Kindle Paperwhite 1/2", (758, 1024), Palette16, 1.8),
'KV': ("Kindle Voyage", (1072, 1448), Palette16, 1.8),
'K1': ("Kindle 1", (600, 670), Palette4, 1.0),
'K2': ("Kindle 2", (600, 670), Palette15, 1.0),
'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.0),
'K34': ("Kindle Keyboard/Touch", (600, 800), Palette16, 1.0),
'K57': ("Kindle 5/7", (600, 800), Palette16, 1.0),
'KPW': ("Kindle Paperwhite 1/2", (758, 1024), Palette16, 1.0),
'KV': ("Kindle Voyage", (1072, 1448), Palette16, 1.0),
}
ProfilesKindlePDOC = {
'KPW34': ("Kindle Paperwhite 3/4/Oasis", (1072, 1448), Palette16, 1.8),
'K810': ("Kindle 8/10", (600, 800), Palette16, 1.8),
'KO': ("Kindle Oasis 2/3/Paperwhite 12/Colorsoft 12", (1264, 1680), Palette16, 1.8),
'K11': ("Kindle 11", (1072, 1448), Palette16, 1.8),
'KPW5': ("Kindle Paperwhite 5/Signature Edition", (1236, 1648), Palette16, 1.8),
'KS': ("Kindle Scribe", (1860, 2480), Palette16, 1.8),
'KPW34': ("Kindle Paperwhite 3/4/Oasis", (1072, 1448), Palette16, 1.0),
'K810': ("Kindle 8/10", (600, 800), Palette16, 1.0),
'KO': ("Kindle Oasis 2/3/Paperwhite 12/Colorsoft 12", (1264, 1680), Palette16, 1.0),
'K11': ("Kindle 11", (1072, 1448), Palette16, 1.0),
'KPW5': ("Kindle Paperwhite 5/Signature Edition", (1236, 1648), Palette16, 1.0),
'KS': ("Kindle Scribe", (1860, 2480), Palette16, 1.0),
}
ProfilesKindle = {
@@ -109,35 +109,35 @@ class ProfileData:
}
ProfilesKobo = {
'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.8),
'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8),
'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.8),
'KoA': ("Kobo Aura", (758, 1024), Palette16, 1.8),
'KoAHD': ("Kobo Aura HD", (1080, 1440), Palette16, 1.8),
'KoAH2O': ("Kobo Aura H2O", (1080, 1430), Palette16, 1.8),
'KoAO': ("Kobo Aura ONE", (1404, 1872), Palette16, 1.8),
'KoN': ("Kobo Nia", (758, 1024), Palette16, 1.8),
'KoC': ("Kobo Clara HD/Kobo Clara 2E", (1072, 1448), Palette16, 1.8),
'KoCC': ("Kobo Clara Colour", (1072, 1448), Palette16, 1.8),
'KoL': ("Kobo Libra H2O/Kobo Libra 2", (1264, 1680), Palette16, 1.8),
'KoLC': ("Kobo Libra Colour", (1264, 1680), Palette16, 1.8),
'KoF': ("Kobo Forma", (1440, 1920), Palette16, 1.8),
'KoS': ("Kobo Sage", (1440, 1920), Palette16, 1.8),
'KoE': ("Kobo Elipsa", (1404, 1872), Palette16, 1.8),
'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.0),
'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.0),
'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.0),
'KoA': ("Kobo Aura", (758, 1024), Palette16, 1.0),
'KoAHD': ("Kobo Aura HD", (1080, 1440), Palette16, 1.0),
'KoAH2O': ("Kobo Aura H2O", (1080, 1430), Palette16, 1.0),
'KoAO': ("Kobo Aura ONE", (1404, 1872), Palette16, 1.0),
'KoN': ("Kobo Nia", (758, 1024), Palette16, 1.0),
'KoC': ("Kobo Clara HD/Kobo Clara 2E", (1072, 1448), Palette16, 1.0),
'KoCC': ("Kobo Clara Colour", (1072, 1448), Palette16, 1.0),
'KoL': ("Kobo Libra H2O/Kobo Libra 2", (1264, 1680), Palette16, 1.0),
'KoLC': ("Kobo Libra Colour", (1264, 1680), Palette16, 1.0),
'KoF': ("Kobo Forma", (1440, 1920), Palette16, 1.0),
'KoS': ("Kobo Sage", (1440, 1920), Palette16, 1.0),
'KoE': ("Kobo Elipsa", (1404, 1872), Palette16, 1.0),
}
ProfilesRemarkable = {
'Rmk1': ("reMarkable 1", (1404, 1872), Palette16, 1.8),
'Rmk2': ("reMarkable 2", (1404, 1872), Palette16, 1.8),
'RmkPP': ("reMarkable Paper Pro", (1620, 2160), Palette16, 1.8),
'RmkPPMove': ("reMarkable Paper Pro Move", (954, 1696), Palette16, 1.8),
'Rmk1': ("reMarkable 1", (1404, 1872), Palette16, 1.0),
'Rmk2': ("reMarkable 2", (1404, 1872), Palette16, 1.0),
'RmkPP': ("reMarkable Paper Pro", (1620, 2160), Palette16, 1.0),
'RmkPPMove': ("reMarkable Paper Pro Move", (954, 1696), Palette16, 1.0),
}
Profiles = {
**ProfilesKindle,
**ProfilesKobo,
**ProfilesRemarkable,
'OTHER': ("Other", (0, 0), Palette16, 1.8),
'OTHER': ("Other", (0, 0), Palette16, 1.0),
}