Skip to content

Cropping

Cropping cuts the empty margin off a page before the page is fitted to the screen, so the drawing comes out larger. The settings are in the Cropping section of Advanced conversion options. Page cropping is dimmed, with the reason, for Webtoon strips and for Use the images as they are, and the three numbers (power, minimum, margin) follow it: they are also dimmed while it is Disabled. Inter-panel cropping is dimmed only for Use the images as they are.

In the pictures of the next two sections, the page that was converted is on the left, with the part that is kept outlined in teal and the part that is cut away shaded pink; on the right is the page as it comes out, on a screen.

The default is Margins and page numbers.

A manga page outlined whole, with nothing shaded, and next to it the page as it comes out on a screen: the same page, with its white margin.
Page cropping: Disabled--cropping disabled1272 × 1696 px, 378 KB
The manga page with its margin shaded pink and the part kept outlined in teal, and next to it the page as it comes out on a screen, with the margin gone and the drawing larger.
Page cropping: Margins and page numbers--cropping margins-and-page-numbers1272 × 1696 px, 428 KB

Art:Go Go! Encyclopedia Girls, page 2 by Kasuga, English version by Masatami (CC BY-SA 4.0). Converted with mangaprep 0.9.0.

The page is the same shape as the screen, so with cropping Disabled the margin stays and the drawing is smaller. With cropping on, the margin goes and the drawing grows to take its place.

  • Disabled: the page goes to the screen as it is.
  • Margins: mangaprep looks for where the drawing is. It turns the page gray (and inverts it when the background is dark), stretches its tones, blurs it slightly, and counts as paper everything lighter than a threshold. The box around what is left is the drawing, and the page is cut to it. No page is cut by more than 10% of its width or height on each side, so a scan with a very wide border keeps what is beyond that.
  • Margins and page numbers: the same, then one more look at a thin strip just above the bottom edge of the box. If it holds exactly one small dark shape, about the size of a number of one to three digits, the page is cut from just above it. Two or more shapes, or one that is too large, are taken for drawing and left alone.

The page above has no page number, so Margins gives the same result as Margins and page numbers. --cropping takes disabled, margins or margins-and-page-numbers; -c is its short form.

The default is 1, and the app accepts 0 to 10. The power sets the threshold the page is judged by: 240 − 64 × power, on a scale where 255 is white. At 1 the threshold is 176, so every tone lighter than that is paper. A higher power lowers the threshold, and darker and darker tones count as paper too, so the crop reaches into shading and thin lines.

The picture outlines the part of one page that is kept at each power, with the power beside the color of its outline. The outlines for 0, 1, 2 and 3 are almost one; 3.75 is the tightest; and at 3.76 nothing is cropped, so its dashed outline is the whole page.

One manga page with five outlines, one inside the other, each in its own color, and a key beside it with the power of each: 0, 1, 2 and 3 are almost the same outline, 3.75 is tighter, and 3.76 is a dashed outline around the whole page.
Cropping power: 0, 1, 2, 3, 3.75 and 3.76--croppingpower

Art:Go Go! Encyclopedia Girls, page 2 by Kasuga, English version by Masatami (CC BY-SA 4.0). Converted with mangaprep 0.9.0.

Source page: 1080 × 1440 px. The pages are not enlarged, so the size shows what was cropped.
SettingOn the command linePage sizeOf the page kept
Cropping power: 0--croppingpower 0975 × 128480.5%
Cropping power: 1--croppingpower 1973 × 128180.1%
Cropping power: 2--croppingpower 2970 × 128079.8%
Cropping power: 3--croppingpower 3954 × 127878.4%
Cropping power: 3.5--croppingpower 3.5946 × 127777.7%
Cropping power: 3.75--croppingpower 3.75887 × 126272%
Cropping power: 3.76--croppingpower 3.761080 × 1440100%

Art:Go Go! Encyclopedia Girls, page 2 by Kasuga, English version by Masatami (CC BY-SA 4.0). Converted with mangaprep 0.9.0.

Higher is not always more. At 3.75 the threshold is 0: only pure black still counts as drawing, so the crop hugs the blackest lines and cuts into the page, down to 887 pixels wide here. A power of 3.76 or more puts the threshold below zero. Nothing counts as drawing, mangaprep finds none, and the page is left uncropped. A power above 3.75 therefore turns cropping off instead of strengthening it. If a scan has gray margins, try 2 before going higher.

--croppingpower sets it.

The default is 0%, and the app accepts 0 to 100%. mangaprep crops only when the cropped page keeps at least this share of the page’s area, and leaves the page as it is otherwise.

Source page: 1080 × 1440 px. The pages are not enlarged, so the size shows what was cropped.
SettingOn the command linePage sizeOf the page kept
Minimum retained area: 0%--croppingminimum 0973 × 128180.1%
Minimum retained area: 70%--croppingminimum 70973 × 128180.1%
Minimum retained area: 80%--croppingminimum 80973 × 128180.1%
Minimum retained area: 81%--croppingminimum 811080 × 1440100%
Minimum retained area: 90%--croppingminimum 901080 × 1440100%

Art:Go Go! Encyclopedia Girls, page 2 by Kasuga, English version by Masatami (CC BY-SA 4.0). Converted with mangaprep 0.9.0.

The crop of this page keeps 80.1%, so a minimum of 80 allows it and 81 refuses it. Use it to protect pages that are mostly empty, where the detected drawing is a small part of the page and cutting to it would blow up a few lines to fill the screen: with a minimum of 70, a crop that would leave less than 70% of the page is not made. --croppingminimum sets it.

The default is 0%, and the app accepts 0 to 100%. The crop is backed off by this percentage after the 10% limit, so some margin stays: at 50% half of what would have been removed is kept, at 100% nothing is removed. In the second picture the dashed outline is where the cut was at 0%.

The manga page with its margin shaded pink and the part kept outlined in teal, and next to it the page as it comes out on a screen.
Preserved margin: 0%--preservemargin 01272 × 1696 px, 428 KB
The same page with the shaded margin narrower: the part kept, outlined in teal, is larger than the dashed outline of the part kept at 0%, and next to it the page as it comes out.
Preserved margin: 50%--preservemargin 501272 × 1696 px, 404 KB

Art:Go Go! Encyclopedia Girls, page 2 by Kasuga, English version by Masatami (CC BY-SA 4.0). Converted with mangaprep 0.9.0.

Source page: 1080 × 1440 px. The pages are not enlarged, so the size shows what was cropped.
SettingOn the command linePage sizeOf the page kept
Preserved margin: 0%--preservemargin 0973 × 128180.1%
Preserved margin: 25%--preservemargin 251000 × 132184.9%
Preserved margin: 50%--preservemargin 501027 × 136089.8%
Preserved margin: 100%--preservemargin 1001080 × 1440100%

Art:Go Go! Encyclopedia Girls, page 2 by Kasuga, English version by Masatami (CC BY-SA 4.0). Converted with mangaprep 0.9.0.

--preservemargin sets it.

The default is Disabled. This option removes the empty gutters between panels, not the margin around the page. Horizontal gaps removes the rows that are paper from edge to edge; Horizontal and vertical gaps removes the columns too. A gutter within 1% of the page’s border is not removed, and a thin strip of every gap stays so that panels do not touch. Cropping power does not apply to it: its threshold is fixed.

It is meant for webtoon-style pages that have long empty stretches. The example joins three pages of Pepper&Carrot into one tall strip, as Reading does, converts it as Webtoon strips, and shows the second page of the result. In each picture the page is on the left, with the rows and columns that were removed shaded pink, and on the right is the page that is left, at the same scale.

A page cut from a strip, with white gaps between its panels. Nothing is shaded, and the same page is on the right.
Inter-panel cropping: Disabled--webtoon992 × 1092 px, 180 KB
The page with the white gaps between its panels shaded pink, and on the right the same page without those rows: it is shorter.
Inter-panel cropping: Horizontal gaps--webtoon --ipc horizontal992 × 1004 px, 173 KB
The page with the white gaps between its panels shaded pink and a white strip along its right edge shaded too, and on the right the page without those rows and columns: it is shorter and narrower.
Inter-panel cropping: Horizontal and vertical gaps--webtoon --ipc both956 × 1004 px, 173 KB

Art:Pepper&Carrot, episode 6 by David Revoy (CC BY 4.0). Converted with mangaprep 0.9.0.

In the last picture the strip along the right edge goes too, and that is not a gutter between panels. For columns, the 1% of the border is measured against the page’s height, not its width, which is how KCC does it and mangaprep follows it. On a page taller than it is wide, a white strip along the right edge is therefore removed as if it were a gutter, while the one along the left edge stays.

--ipc takes disabled, horizontal or both.