book-to-images

Capture EPUB pages from Apple Books and generate trimmed PNG images.

1|1|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/brianlan/improved-ai-agent --skill book-to-images
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: book-to-images
Source: https://github.com/brianlan/improved-ai-agent/tree/main/skills/book-to-images
Command: npx skills add https://github.com/brianlan/improved-ai-agent --skill book-to-images

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes scripts (resource) components.

What problem does it solve?

Automate capturing EPUB pages from the Books app and turning them into reusable PNG images, ready for OCR or dataset preparation.

Core Features & Use Cases

  • Capture and convert: Automatically capture EPUB pages from Books and convert them into lossless PNG images.
  • Trim and split: Trim side black UI bars and split each image into an A/B pair for efficient OCR indexing.
  • Flexible workflows: Supports one-shot pipeline runs, capture-only reruns, and split-only reruns with configurable thresholds and worker counts.

Quick Start

Run the full pipeline to capture all pages from Books as lossless PNGs, trim side black bars, and generate paired A/B images for OCR-ready datasets.

Frequently Asked Questions about book-to-images

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract EPUB pages from Apple Books as PNG images for OCR?

Capture EPUB pages from Apple Books as PNG images by running a Python automation pipeline that screenshots the Books app, trims black UI side bars, and splits pages into A/B pairs for OCR dataset preparation.

Does the EPUB to image extraction skill work on Windows or Linux?

EPUB to image extraction is macOS exclusive. It relies on AppleScript to control the native Apple Books app for screen capture, meaning Windows and Linux environments lack the required application and automation bridge.

Can I rerun just the image splitting step without capturing the EPUB pages again?

You can rerun the image splitting step independently. The workflow supports split-only reruns, allowing you to process previously captured PNGs with configurable split thresholds and worker counts without triggering screen capture again.

What is the best way to automate trimming black UI bars from captured book images?

Automate trimming black UI bars from captured book images using the integrated Python script with Pillow. It automatically detects and removes side bars during the split stage, outputting clean A/B PNG pairs for OCR indexing.

Do I need Python and Pillow installed to convert Apple Books to PNG?

You need Python and the Pillow dependency installed to convert Apple Books EPUBs to PNG. Python executes the pipeline scripts while Pillow handles the image processing required to trim black bars and generate A/B pairs.

Why split captured book pages into A/B PNG images for dataset preparation?

Splitting captured book pages into A/B PNG images halves the page for efficient OCR indexing. It creates standardized, smaller image files that OCR engines can process faster, yielding cleaner text extraction results for datasets.