EPUB slicer

Give your books their pictures back.

Toybox reads EPUBs, but a novel's plates and chapter headers arrive as a filename on an empty page — the device has a band of RAM, not room to scale a 1200×1800 JPEG. Drop a book here and every picture in it comes back fitted, dithered and packed for the panel. The book never leaves this tab.

Drop an EPUB here or click to choose one

What it does to the book

Four steps per picture, in this order.

1 · Trims the border

Plates ship with dead space: a scan margin, or a drawing centred on a coloured field. The border colour is read off the outermost ring rather than assumed to be white, so a plate bled to black is trimmed too. It happens before fitting, so the scale is computed from the art instead of the frame.

Except the cover. The first picture in reading order is left whole, because there the flat band is not dead space — it is the design the title sits in. It is fitted, not cropped to fill: filling the panel from a 2:3 cover cuts 5% off each side, which was enough to take the end off the title and the whole illustrator credit on the book this was measured against.

2 · Turns a wide plate sideways

A 2.2:1 picture fitted upright into a 480×800 panel covers 27% of the glass. Turned anticlockwise it covers 75%. Anything wider than 1.15:1 gets turned — the same direction a manga spread comes upright, so everything you tilt the device for is tilted the same way.

3 · Fits it whole, never crops

Lanczos down to fit inside 480×800, centred on white. A wallpaper is cropped to fill because a letterboxed photo reads as a mistake; a plate is not, because cropping one cuts the edges off the drawing.

4 · Dithers to one bit

Serpentine by default. It reverses the scan direction on every other row, which cancels the faint diagonal worms raster order leaves in flat greys — measured on real pages, tone error unchanged, directional bias down 29×. Floyd–Steinberg is the plain version, and what the desktop app defaults to. Threshold does no diffusion at all, which is what you want for a page that is really text: a scanned map, a table, a title plate.

What comes out, and what it does not touch

Each picture becomes a toybox/<path>.tbi entry: 480×800, one bit, 48,008 bytes, which the reader blits straight to the panel. Your book's own text, pictures, order and metadata are copied through byte for byte — the original compressed streams are moved across without being unpacked — so the file still opens in any other reader exactly as it did before.

SVG is skipped and says so: the device cannot draw one either.

You also get a second file, <book>.cover.tbi. Drop it on the card beside the book, keeping the name, and the shelf uses it instead of decoding a cover on the device — which is both slower and worse, because a streaming decoder with a band of RAM turns a flat grey into a field of worms. It is always Floyd–Steinberg, whatever you set above: the cover spec names that algorithm outright.

Is this the same as the desktop app?

Byte for byte, yes, and that is tested rather than hoped for. TOYBOX Slicer is the desktop version — it also does CBZ manga, wallpapers and cover sidecars, which this page does not. Its test suite converts a book both ways and compares every entry; the arithmetic here is a transcription of Pillow's, down to the integer truncation, because a dither turns a one-level difference into a flipped bit.

Built from Toybox Slicer v1.2.2.