1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00
Commit Graph

61 Commits

Author SHA1 Message Date
Alex Xu
4bb6ba55d3 cover has minimal processing and is shared across splits (#953)
* refactor cover handling

* skip cover processing

* rename cover to cover_path

* fix scribe mobi detection

* make things closer

* rename save to save_to_epub
2025-06-08 11:08:57 -07:00
Alex Xu
3ac5709e73 Add Kindle PW 7/10, Kindle 8/10 to PDOC list for easier covers (#955)
* add more pdoc

* update readme
2025-06-07 21:59:06 -07:00
Alex Xu
4712eac3c2 fix ebok thumbnail aspect ratio (#956) 2025-06-07 21:45:42 -07:00
Alex Xu
c3d2f89471 don't add white padding if forced white background checked 2025-05-14 09:18:33 -07:00
Alex Xu
b1c4cd36f1 don't add borders around small images 2025-05-14 09:18:33 -07:00
Alex Xu
36180f7904 Revert "fix Kindle Scribe panel view broken in 6.1.0 (#894)" (#903)
This reverts commit 1dd36e08eb.
2025-04-17 09:17:47 -07:00
Alex Xu
1c81a9d5b3 fix panel view order for no rotate (#897) 2025-04-15 15:38:03 -07:00
Alex Xu
1dd36e08eb fix Kindle Scribe panel view broken in 6.1.0 (#894) 2025-04-08 10:27:35 -07:00
Alex Xu
3e3710dd76 Add preserve margin % toggle (#886)
* preserve margin

* set ratio to 0.5

* add preserve margin GUI

* increase step size to 5

* remove clear

* fix save

* save preserveMarginBox

* math

* max 99
2025-04-03 10:11:14 -07:00
Alex Xu
4337d6c10d try to crop only main cover from wide cover scan (#875) 2025-03-21 10:17:23 -07:00
Alex Xu
9680ff24c2 split covers in half if too wide (#874) 2025-03-18 21:23:34 -07:00
Alex Xu
23099cee81 fix landscape alignment (#865) 2025-03-12 19:09:58 -07:00
Alex Xu
561951a349 restore imgMetadata dict (#858)
* Revert "memory optimization: store metadata in filenames, not a global dict (…"

This reverts commit 9a2a09eab9.

* only remove imgOld
2025-03-11 09:57:11 -07:00
Alex Xu
9a2a09eab9 memory optimization: store metadata in filenames, not a global dict (#853)
* remove options.imgMetadata and store metadata in filename

* make kcc much more memory efficient by removing imgMetadata and imgOld dicts
2025-03-09 16:52:07 -07:00
Alex Xu
9e204aad76 rename images before processing to fix splitting issues (#852)
* rename images before processing to fix splitting issues

* import pathlib

* 9999 page limit
2025-03-07 07:59:04 -08:00
Alex Xu
01625904d1 huge speed optimization on HDD by removing md5 (#845)
* Eliminate unnecessary use of MD5 checksum

md5checksum() computes the actual checksum of a specified file, which is appropriately expensive, but the code seemed to be using the checksum result as a key into the imgMetadata dictionary to avoid handling image files being renamed during processing steps. This seems like a very expensive way to handle the rename so instead, I now update the imgMetadata keys with the new filename in the one place that the rename happens, and avoid MD5 checksums entirely.

* merge conflicts

* Add missing handling for image path renames due to nested chapter folder name

* merge conflicts

* merge conflicts

* add perf_counters

* imgFileProcessing perf_counter

* use startswith and removeprefix

---------

Co-authored-by: utopiafallen <utopiafallen@gmail.com>
2025-03-04 11:28:23 -08:00
utopiafallen
62ffa2bc80 Improve processing performance by partially undoing "Refactored detection of corrupted files"
Commit f952634971 moved image corruption detection out from the ComicPage constructor and into a standalone detectCorruption() function. This led to a performance regression because now corruption detection happens in a single thread when it used to be distributed across worker threads, and because a source image is now loaded twice in memory: once during corruption detection and once when actually going to process the image.

Image file corruption detection is now back inside the ComicPage constructor and the extra load() has been removed because the convert() call will automatically invoke load() and most likely throw the same exceptions.
2025-02-28 19:49:13 -08:00
Alex Xu
3d4fae62d8 reduce rainbow checkbox (#824) 2025-02-09 19:10:56 -08:00
X5Games / Neyney10
2f703ef92c Inter-panel cropping method. (#810)
* Inter-panel cropping method.

* 1. Save interpanelcrop option.
2. Update readme with the the new interpanelcrop argument.
3. Add a tooltip to the inter-panel crop box.
2025-01-27 13:44:23 -08:00
Alex Xu
317fb33fd0 No Rotate option (#785)
* no rotate

* Revert "no rotate"

This reverts commit b6f1fe8882.

* implement norotate
2025-01-03 19:43:20 -08:00
Matthias Witte
4769f68265 Remarkable profiles (#781)
* Add profiles for remarkable 1, 2 and Paper Pro

* Add remarkable icons based on Other.png

* Mention remarkable profile in README.md
2024-12-13 14:08:08 -08:00
neyney10
4a661a1a17 [A new image cropping algorithm]
1. Replaced both crop margins and crop margins & page num with newer algorithm.
2. Crop max power level increased to 3.0
3. Adds NumPy as a new dependency.
2024-11-11 15:51:41 -08:00
Alex Xu
5168cd73c4 Make it easier to add new profiles (#764)
* refactor

* put pw12 under oasis profile

* remove kindle 12 tag

* separate ebok and pdoc

* put cs 12 on top
2024-11-04 20:24:12 -08:00
Alex Xu
8d204668a7 add kindle 12th gen, including colorsoft (#762)
* add kindle colorsoft

* fix typo
2024-10-23 21:17:22 -07:00
Dominik Gedon
44094bdb21 Add Kobo Libra/Clara colour (#703)
* fix: trailing whitespaces

* Add color toggle mode

* Add Kobo Libra Colour

Signed-off-by: Dominik Gedon <dominik@gedon.org>

* Add Kobo Clara Colour

Signed-off-by: Dominik Gedon <dominik@gedon.org>

* Address suggestions

* Address more suggestions

---------

Signed-off-by: Dominik Gedon <dominik@gedon.org>
2024-06-09 08:00:25 -07:00
Alex Xu
a9a2f47e30 fix 1860 width 2024-05-28 09:55:59 -07:00
Alex Xu
cbc1ed5db4 Kindle Scribe 1860 max width (#691)
* Kindle Scribe 1860 max width

* create kindle_scribe_azw3 var

* clean up code
2024-05-17 09:55:43 -07:00
Alex Xu
13fedff77b lower auto crop threshold (#598) 2023-10-26 19:20:26 +00:00
Alex Xu
37200bdca0 Crop images within 3% of device aspect ratio (#495)
* Crop images within 3% of device aspect ratio

* use pad instead of expand+fit

* reafactor threshold check

* remove default val
2023-05-14 16:34:11 +00:00
Alex Xu
9ab1cd359c remove transparency from image info 2023-03-27 22:04:35 +00:00
Frédéric Brière
16e275bb1f Added --croppingminimum option to set a cropping minimum area ratio
Closes #342
2023-01-21 11:30:30 +01:00
Cory Kleinschmidt
c979486e28 Fix pillow backwards compatibility, add mozjpeg-lossless-optimization to setup.py (#461)
- Fix pillow backwards compatibility
- Add mozjpeg-lossless-optimization to setup.py
2023-01-21 00:35:59 +01:00
darodi
2c19898952 Fix spread splitter not keeping aspect ratio 2023-01-14 00:31:11 +01:00
rourien
7ab96c5573 Add backwards compatibility for Pillow >9.1.0 from 4b127b1 2023-01-14 00:31:11 +01:00
rourien
1fbfaeae01 Update deprecated pillow filters
See https://pillow.readthedocs.io/en/stable/deprecations.html#constants
2023-01-14 00:31:11 +01:00
darodi
3ea9a486bf profiles: add Kindle11 and Kindle Scribe 2023-01-14 00:31:10 +01:00
lennie420
95f138887e Update with new Kobo models
* Update Kobo profile list

Update the Kobo models to the current models available from Kobo. I have kept Kobo Forma as this is a popular device amongst manga readers even though it's currently unlisted from Kobo UK's site.

Co-authored-by: darodi <4682830+darodi@users.noreply.github.com>
2023-01-14 00:31:10 +01:00
darodi
324047bebc Fix type error in autocontrastImage 2023-01-14 00:27:53 +01:00
darodi
842a729c75 turn 1x4 strips into 2x2 2023-01-14 00:27:53 +01:00
darodi
79715c6a06 add --mozjpeg option and GUI checkBox 2023-01-13 22:48:53 +01:00
Einlar
c91be77588 Add profile for Kindle PW5/Signature 2021-11-13 13:50:56 +01:00
Frédéric Brière
9fdbf095d3 Add profiles for the Kobo Clara HD and Libra H2O
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.
2019-11-12 11:59:22 -05:00
Paweł Jastrzębski
67e913ed9e Version bump 2019-10-21 13:50:53 +02:00
Paweł Jastrzębski
50dc7fbffe Added profile label for Oasis 3
New profile is unnecessary.
2019-08-04 08:40:48 +02:00
Paweł Jastrzębski
409f077c3e Bye, bye DEBs 2019-03-06 19:50:17 +01:00
Paweł Jastrzębski
c07a9657ef Removed MCD support 2019-03-06 16:16:26 +01:00
Paweł Jastrzębski
7f719a22ad Added PW4 profile (close #293) 2019-03-06 16:01:18 +01:00
Paweł Jastrzębski
332d3d455e Version bump 2019-03-06 15:47:18 +01:00
MurphyTsai
a7ea795df5 support kobo forma. 2019-01-03 14:52:28 +08:00
Paweł Jastrzębski
6792c2d366 Bump MAX_IMAGE_PIXELS (close #273) 2018-07-09 08:30:12 +02:00