1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-12 17:26:23 +00:00

1666 Commits

Author SHA1 Message Date
Alex Xu
741cab68f3 min crop with page numbers (#1050)
* min crop with page numbers

* fix order
2025-07-26 19:13:15 -07:00
Alex Xu
7f8f3e67b7 Update README.md 2025-07-26 07:36:58 -07:00
Alex Xu
be12661f38 only flatten super long paths on Windows 2025-07-26 07:26:38 -07:00
Alex Xu
06e2ee2968 ignore 2% of pixels near edges and don't crop more than 10% per edge (#1044)
* max crop and ignore edges

* make edge_bbox neater
2025-07-26 07:26:10 -07:00
Alex Xu
27296565a3 display non kindle only 2025-07-26 07:17:45 -07:00
Alex Xu
bb70337a35 crop_main_cover ratio adjustment 2025-07-26 07:12:44 -07:00
Alex Xu
cf0586ae70 Update README.md 2025-07-22 17:27:09 -07:00
Alex Xu
4100141b46 Update README.md 2025-07-22 10:38:43 -07:00
Alex Xu
8eb81b7d67 fix 5.15.3 typo 2025-07-22 10:38:02 -07:00
Alex Xu
e2dbc05a83 add OCLP note 2025-07-22 10:36:47 -07:00
Alex Xu
50b82786a1 install pymupdf on armv7 2025-07-22 09:34:59 -07:00
Alex Xu
88d1643f64 Update README.md 2025-07-20 22:56:55 -07:00
Alex Xu
ddf2fa360f Update README.md 2025-07-20 22:56:15 -07:00
Alex Xu
43e974f20d add humble/fanatical pdf note 2025-07-20 22:55:15 -07:00
Alex Xu
e3a3e9b3c2 bump to 9.0.0 v9.0.0 2025-07-20 21:59:24 -07:00
Alex Xu
380dc5c42c add pymupdf requirement 2025-07-20 21:57:08 -07:00
Alex Xu
8ab7520754 nested archives are not supported 2025-07-20 13:49:18 -07:00
Alex Xu
3cd6e09bcb extract_image instead of Pixmap if possible 20x faster 2025-07-20 12:20:13 -07:00
Alex Xu
cb5f4db5c4 don't try catch so many layers of pdf 2025-07-20 12:04:25 -07:00
Its-my-right
f1ffb2c4e8 Update rainbow_artifacts_eraser.py
Enable odd width for BW image when using Rainbow Eraser by passing original image dimensions to irfft2
2025-07-20 11:16:18 -07:00
Its-my-right
26327728d0 Update rainbow_artifacts_eraser.py
add param s=luminance.shape to irfft2 to avoid dimensions error on luminance
2025-07-20 10:55:09 -07:00
Alex Xu
61bfb0a51f fix pdf resolution 2025-07-20 09:19:40 -07:00
Alex Xu
2f03119926 add mupdf perf_counters 2025-07-20 09:02:19 -07:00
Alex Xu
8f08c63f4e pdf input uses all cpu cores 2025-07-20 09:02:19 -07:00
Adrian
eb24a400b4 Improve pdf support by using mupdf (#983)
* Improve pdf support with mupdf

* parallel page ranges not pages

* fix black blank

* remove full=True

* add TODO

* fix doc close

---------

Co-authored-by: Alex Xu <alexkurosakimh3@gmail.com>
2025-07-18 17:45:20 -07:00
Its-my-right
cc2eb9dcf3 Feature/rainbow eraser for color images (#1034)
* Add rainbow_artifacts_eraser helper

This helper file contains the methods necessary to perform a fourier transform on the picture, to remove frequencies responsible for rainbow artifacts on Kaleido screens, and performe the reverse fourier transform

* Replace blurring method with frequency removal method to erase rainbow effect on Kaleido 3 screens

* High performance improvements by using rfft2 instead of fft2

* Fine-tuned the settings and added the perpendicular direction for a better final rendering

The finer settings allow for more information to be retained in the final image, while still effectively removing the rainbow effect.

Adding the perpendicular direction results in a better rendering of the final image (avoiding visual artifacts related to suppression at the main angle).

* Revert the addition of perpendicular angles and lower attenuation_factor

It was a mistake to add the perpendicular angles in the previous commit: I had the rainbow effect removal process called 2 times when I did this, for testing purposes (One before downscale and one after downscale).

The proper way to call the process is only after the downscale. And in this case it is not necessary to remove frequencies along the perpendicular angles.

In the mean time, attenuation_factor=0.15 has proven to work well along a collection of testing images.

It should be my latest commit for this feature

* Also attenuate high frequencies at 45°

CFA is sometimes orientated at 135°, sometimes at 45° so until we find if there is a law depending on the screen size, e-reader model or something, the best we can do is attenuate high frequencies on those two directions

* fix imports

* Update comic2ebook.py

Calculate is_color with (opt.forcecolor and img.color)

pass is_color to img.optimizeForDisplay

* Update image.py

Remove color check condition, because now we process colored images too.

Pass is_color to erase_rainbow_artifacts

* Update rainbow_artifacts_eraser.py

Add support for colored images: Convert to YUV, extract luminance channel, do FFT -> Filter -> IFFT on luminance channel, insert back to YUV, convert back to RGB

To maximize compatibility until we know for sure the orientation of CFA for each device, filtering is now done on 135° + 45° axis

After more testing, attenuation_factor is decreased to 0.10

* Update comic2ebook.py

Rename rainbow eraser param

* Update image.py

rename rainbow eraser param

* Update KCC.ui

Rename rainbow eraser checkbox and tooltip

* Update KCC_ui.py

Rename erase rainbow checkbox and tooltip

* Update KCC_gui.py

Rename erase rainbow checkbox and option

* Update README.md

rename erase rainbow param

* Update KCC_gui.py

correct param name for eraserainbow

---------

Co-authored-by: Alex Xu <alexkurosakimh3@gmail.com>
2025-07-18 10:48:56 -07:00
Alex Xu
d1a443b3d8 Update README.md 2025-07-18 10:23:36 -07:00
Alex Xu
f8c35ce634 Update README.md 2025-07-18 10:23:01 -07:00
Alex Xu
580a800d25 Update README.md 2025-07-18 10:18:01 -07:00
Alex Xu
023797f012 fix imports 2025-07-18 07:38:50 -07:00
Its-my-right
63a18627d3 Also attenuate high frequencies at 45°
CFA is sometimes orientated at 135°, sometimes at 45° so until we find if there is a law depending on the screen size, e-reader model or something, the best we can do is attenuate high frequencies on those two directions
2025-07-18 07:38:50 -07:00
Its-my-right
0d967084a0 Revert the addition of perpendicular angles and lower attenuation_factor
It was a mistake to add the perpendicular angles in the previous commit: I had the rainbow effect removal process called 2 times when I did this, for testing purposes (One before downscale and one after downscale).

The proper way to call the process is only after the downscale. And in this case it is not necessary to remove frequencies along the perpendicular angles.

In the mean time, attenuation_factor=0.15 has proven to work well along a collection of testing images.

It should be my latest commit for this feature
2025-07-18 07:38:50 -07:00
Its-my-right
2da5b11858 Fine-tuned the settings and added the perpendicular direction for a better final rendering
The finer settings allow for more information to be retained in the final image, while still effectively removing the rainbow effect.

Adding the perpendicular direction results in a better rendering of the final image (avoiding visual artifacts related to suppression at the main angle).
2025-07-18 07:38:50 -07:00
Its-my-right
f6d10337d8 High performance improvements by using rfft2 instead of fft2 2025-07-18 07:38:50 -07:00
Its-my-right
cf047ecf6f Replace blurring method with frequency removal method to erase rainbow effect on Kaleido 3 screens 2025-07-18 07:38:50 -07:00
Its-my-right
e7ee8bed9d Add rainbow_artifacts_eraser helper
This helper file contains the methods necessary to perform a fourier transform on the picture, to remove frequencies responsible for rainbow artifacts on Kaleido screens, and performe the reverse fourier transform
2025-07-18 07:38:50 -07:00
Alex Xu
9c8a1759cf update level comment 2025-07-13 22:29:11 -07:00
Alex Xu
6299754964 draft: add black point level (#1028)
* initial black point

* convert to L

* add GUI
2025-07-13 21:52:17 -07:00
Alex Xu
a3db86a29b convert to grayscale as last step 2025-07-13 15:23:54 -07:00
Alex Xu
67714a9b06 fix color autocontrast (#1026) 2025-07-11 16:28:19 -07:00
Alex Xu
95f9a3cda9 put dot_clean in sanitize 2025-07-10 23:07:15 -07:00
Alex Xu
0e12fc30c6 restore lenient ComicInfo.xml handling (#1024) 2025-07-10 13:57:29 -07:00
Alex Xu
90c9ba7539 bump 8.0.4 v8.0.4 2025-07-10 09:19:57 -07:00
Alex Xu
84da718167 more extraction fixes (#1023) 2025-07-10 09:14:06 -07:00
Alex Xu
fe7559e6a9 Add note about RTL CBZ output 2025-07-10 06:58:03 -07:00
Alex Xu
a79c740387 don't autocontrast color content (#1021) 2025-07-09 13:59:54 -07:00
Alex Xu
bc98eecae9 bump 8.0.3 v8.0.3 2025-07-09 11:28:25 -07:00
Alex Xu
e7a07377ef add avif input support (#1019)
* add avif input support

* add avif
2025-07-09 11:27:58 -07:00
Alex Xu
07ef11013a fix cbz metadata (#1018) 2025-07-09 11:14:25 -07:00
Alex Xu
551fe6edbf bump 8.0.2 v8.0.2 2025-07-05 07:41:08 -07:00