Go to file
2022-01-17 13:47:47 -08:00
img Add site metadata 2021-12-14 17:59:16 -08:00
mangle Make ratio comparison more explicit 2022-01-17 13:47:47 -08:00
.gitignore Add generated files to ignore 2021-04-05 15:51:18 -07:00
INSTALL.md Merge pull request #40 from axu2/patch-2 2021-05-22 12:17:57 -07:00
LICENSE update license file 2019-04-28 11:51:37 -07:00
mangle-cli.py Doc comments of example 2021-07-16 20:51:32 -07:00
mangle.pyw Added "Split left and right pages" option 2013-10-17 12:42:42 +11:00
README.md Add site metadata 2021-12-14 17:59:16 -08:00
requirements.txt Remove Pillow since reportlab depends on it 2021-04-25 14:57:56 -07:00
setup.py Add install instructions 2021-03-27 19:05:53 -07:00

Mangle

Mangle is a cross-platform image converter and optimizer built for reading Manga on the Amazon Kindle and other E-ink devices written in Python. With this application you can easily:

  • Sort and organize images from different directories; bulk rename feature exists for output to the Kindle.
  • Optionally re-save images in a format Kindle will be sure to understand with no visible quality loss.
  • Downsample and rotate images for optimal viewing on Kindle, convert to grayscale to save space and improve contrast.
  • Automatically generate book meta-data so that your Manga is always properly detected and viewable in-order.

Motivation

Many years ago I received an Amazon Kindle as a gift. I immediately began playing around with it and reading about certain undocumented features that the Kindle has to offer. After a couple of hours I discovered it to be the perfect device for reading Manga is almost always grayscale, and the aspect ratio fits the Kindle's 600x800 pixel screen almost perfectly. Better yet, the Kindle's undocumented image viewer actually keeps track of the last image you viewed and thus you are always able to return to the page you left off on when you power on your Kindle. The device supports several popular image formats (jpeg, png, gif, etc), and is able to dither and downscale images to fit the screen.

However... The Kindle's image viewer does have certain shortcomings:

  • The Kindle is very picky about file format; any additional embedded data (thumbnails, comments, possibly even EXIF data) can confuse it. As a result, images may not display properly or even not at all (which actually prevents you from reading the given book, as one bad panel will prevent you from viewing subsequent images).
  • The first image that you view in a Manga (until the Kindle first writes the "bookmark" file) seems to be arbitrary even when files are named sequentially. About half the time it will correctly pick the first file in the batch, at other times it will pick out some other image seemingly at random.
  • Normally for Kindle to find your Manga scans you have to press Alt + Z on the home screen. I haven't always had luck with it correctly identifying image directories. At other times, after finding an image directory the Kindle will appear to hang while trying to access it (forcing you to return to the home screen).
  • The Kindle image viewer has no functionality to rotate images. So if there is a horizontally large image (such as what often happens with dual-page scans), it can be difficult to make out the text because the image is simply scaled to fit (consequently leaving a lot of wasted space at the bottom of the screen).
  • Scanlation images are oftentimes much larger than the 600x800 screen; not only does this make them take more space on your memory card but it also slows down image loading (the Kindle has to read more data off of the slow SD card and scale the image). Scanlations often also include color scans of covers and inserts which take up more space than a grayscale equivalent (which is would be fine for the Kindle's limited display).
  • Kindle's image viewer provides no way to sort images (to determine in which order they are shown). This can be very problematic especially considering that scanlation groups have differing naming conventions, and as a result files from later chapters may appear before earlier ones when you are reading your Manga (spoilers ftl).

Mangle was born out of my annoyance with these issues. The program name is a portmanteau of "Manga" and "Kindle"; I thought it was pretty clever at the time.

Usage

  1. Add the desired images and image directories to the current book.
  2. Re-order the images as needed (files pre-sorted alphabetically).
  3. Configure the book title and image processing options.
  4. Create a root-level directory on your Kindle called pictures (case sensitive).
  5. Export your images, selecting the pictures directory you just created.
  6. Enjoy your Manga (if it doesn't show up, press Alt + Z while on the home menu).

Dependencies

Installation

Pre-built binaries are available for download from the project's releases page.