Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add profile for Kindle Paperwhite 5 (Signature Edition) #404

Merged
merged 4 commits into from Jan 13, 2023

Conversation

Einlar
Copy link

@Einlar Einlar commented Nov 13, 2021

Adds a profile for Kindle PW 5 (also known as "Signature Edition") with a 6.8 inch display. The resolution (1236x1648) was found from Wikipedia.

This also adds the changes from two other PRs (#393 and #331 ) for convenience.

Full installation procedure

I assume you have git and Python 3 installed. I did this on Windows 10, but it should work also on Linux.

Clone the repo:

git clone https://github.com/ciromattia/kcc
cd kcc

Merge with this PR:

git fetch origin pull/404/head:kindle_signature
git checkout master
git merge kindle_signature

Install

pip install -r requirements.txt
python setup.py install

Launch
python ./kcc.py

You may need KindleGen.exe. Steps for adding it can be found here (as pointed in the issue #402).

fbriere and others added 4 commits November 12, 2019 11:59
Note: I omitted the "HD" and "H2O" suffixes from the labels to keep
things simple, since they do not denote a variation of a preexisting
model, as was the case with the Aura.
@DannyEnsink
Copy link

I followed your full installation procedure. Once I click the Convert button in KCC I get the following error message in a Windows Error popup. Any idea what's going wrong?

Error during conversion C:\Users\Danny\Desktop\File.cbz:

One of workers crashed. Cause: 'float' object cannot be interpreted as an integer

Traceback:
  File "S:\GitHub\kcc\kindlecomicconverter\comic2ebook.py", line 563, in imgFileProcessing
    img.autocontrastImage()
  File "S:\GitHub\kcc\kindlecomicconverter\image.py", line 261, in autocontrastImage
    self.image = ImageOps.autocontrast(Image.eval(self.image, lambda a: 255 * (a / 255.) ** gamma))
  File "C:\Program Files\Python310\lib\site-packages\PIL\Image.py", line 3107, in eval
    return image.point(args[0])
  File "C:\Program Files\Python310\lib\site-packages\PIL\Image.py", line 1680, in point
    return self._new(self.im.point(lut, mode))

@ignaciobolonio
Copy link

Thank you for the PR, let's hope the owner can release a new version with this 🤞
I have tried myself to run in mac with no success. Every time I run it, it cannot locate KindleGen and 7lib (kindlegen path already added as an env var and even in $PATH) while the latest release binary works fine for me. I could not build a new binary either. Let me know if I can do something else to fix it.

@comicrocharly
Copy link

comicrocharly commented Nov 24, 2021

Thanks, works fine on Linux.
Kindlegen needs to be copied in /usr/local/bin .

In Windows i have the same problem as @DannyEnsink .

@darodi
Copy link
Collaborator

darodi commented Nov 27, 2021

Thanks for your pull request.

There was a small problem with it.
Panel view 4/2/HQ doesn't work with it. Double tap does nothing.

I created a new pull request with an additional commit to fix it.

see #405

@DannyEnsink
Copy link

DannyEnsink commented Nov 27, 2021

Does this also fix the issue @comicrocharly and I (see #404 (comment)) are having on Windows?

@darodi
Copy link
Collaborator

darodi commented Nov 27, 2021

@DannyEnsink

I haven't been able to reproduce your error, but you can maybe try replacing this line
self.image = ImageOps.autocontrast(Image.eval(self.image, lambda a: 255 * (a / 255.) ** gamma))
with
self.image = ImageOps.autocontrast(Image.eval(self.image, lambda a: int(255 * (a / 255.) ** gamma)))

in \kindlecomicconverter\image.py line 261

@DannyEnsink
Copy link

DannyEnsink commented Nov 28, 2021

That worked, thanks. I'll update this comment when I verified the results on the Paperwhite 5.

EDIT: Tested with the generated .mobi from KCC and put in the documents folder on the Paperwhite 5. Works great!

@darodi darodi merged commit c91be77 into ciromattia:master Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants