A plugin for
KOReader that adds an option to remove the rainbow artifacts produced on Kaleido 3 color e-ink screens. It is primarily useful for black and white comics/manga that use image patterns which produce these artifacts.
It uses fourier transforms on-the-fly to directly target the moiré patterns responsible for the rainbow effect. Compared to the method used for reducing the rainbow effect that is found in the official Kobo software, this method does not negatively affect the image by introducing noticeable blur, instead it stays sharp.
The methodology for this is explained in detail in this video by @axu2, the maintainer of Kindle Comic Converter.
The filtering does make rendering each page for the first time slower, but performance should be improved with future updates. The time taken to read a page should make it feel seamless as rendering is automatically done in the background.
Made for koreader/koreader#11877.
- Download the latest release here.
- Extract the
derainbowify.koplugindirectory from the archive. - Move the
derainbowify.koplugindirectory to thekoreader/pluginsfolder on your device. - Restart KOReader.
- You should see a new option called "Derainbow" on the
Contrast menu when opening a document.
By design, this plugin is designed for e-readers that use color e-ink such as the Kobo Libra Color, Kobo Clara Color, Kindle Colorsoft, PocketBook Inkpad Color 3, and relevant Bigme, Boox, and Meebook devices.
In order to compile and test the plugin yourself, you may run the package.sh script found at the root of this repository. It will produce a ZIP file containing the plugin located at /tmp/derainbowify.koplugin.zip.
The dependencies for compilation are make, gcc, and each of the following toolchains found from KOReader's koxtoolchain:
- Kobo
- Kindle5
- KindleHF
- Pocketbook
Please ensure you have the necessary toolchains added to your path. The Android NDK is also required for compilation for Android devices (ARM & ARM64). The ANDROID_NDK_HOME environment variable must be set.
- Adapted from the original amazing work done by @Its-my-right for the Pocketbook Inkpad Color 3 here.
- Based on the technique used in Kindle Comic Converter and the great video presentation by @axu2.
- Inspired by the idea from @Blendman974 to use fast fourier transforms to solve this issue.
- This plugin uses the following libraries for fast fourier transform implementations: kissfft, pffft, and pocketfft.
- The packaging system in use is based on work from ComicReader by @OGKevin.
- The image with the rainbow artifacts shown here is from the blog, Midnight Reading by Renkon, and this post by them.
- The process for staging Android libraries was inspired by imageprocessing.koplugin by @anezih.
If you want to support me, you can star this repository or buy me a coffee. :)
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for full details.
