Skip to content

feat: reorder spread image processing to crop before splitting#1280

Open
johnny-official wants to merge 1 commit intociromattia:masterfrom
johnny-official:feat/reorder-spread-image-processing-to-crop-
Open

feat: reorder spread image processing to crop before splitting#1280
johnny-official wants to merge 1 commit intociromattia:masterfrom
johnny-official:feat/reorder-spread-image-processing-to-crop-

Conversation

@johnny-official
Copy link
Copy Markdown

Problem

The current image processing pipeline for spread images applies cropping after the image has been split into two individual pages. This can lead to visual misalignment of the artwork when the comic is viewed, especially in landscape mode, as the cropping on each half might not be perfectly symmetrical or might remove content intended to be continuous across the original spread. The root cause is the incorrect order of operations.

Changes

Locate the function responsible for processing spread images (e.g., split_spread, process_page). Within this function, reorder the image manipulation steps to ensure that any global cropping (e.g., smart cropping, margin removal) is applied to the entire spread image first. After the spread image has been pre-cropped, then proceed to split it into two separate pages. This ensures that the cropping is consistent across the entire spread before division, preserving artwork alignment.

Modified files:

  • kindlecomicconverter/image_processor.py (new)

Tested by running the project's existing test suite. No unrelated changes included.

Closes #594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crop spread images before splitting

1 participant