go-comic-converter
go-comic-converter copied to clipboard
add split limit
The latest version still does not completely solve the split bug of overly wide images.
Take a look at this example: KRR_27.zip
The width of the first image in this file is 1392 and the height is 600
If this setting is enabled, the xhtml duplicate bug appears again.
-autosplitdoublepage -hascover=false -keepdoublepageifsplit=false
The bug here is: if the width of the first picture is greater than the height, -hascover=false and -keepdoublepageifsplit=false cannot coexist.
After enabling -hascover=false and -keepdoublepageifsplit=false at the same time, 3 img_0 pictures will be generated, and xhtml bugs will occur at the same time.
In addition to this bug, I also want to completely solve the problem of images that are too wide. The existing split methods should be improved and become smarter.
Since the H/W ratio of manga is usually 1.4 ~ 1.55 (A4, B6...), so the W/H ratio of manga double pages that need to be divided is usually 1.29 ~ 1.428
The reason for the split error is that the splitted image still satisfies that the width is greater than the height.
The root cause is that the W/H ratio of the original image is greater than 2
But we know that the W/H ratio of a double page that needs to be divided is absolutely impossible to be greater than 2.
These bug images with an aspect ratio greater than 2 should not be split, as these images will not contain the main content of the comic, just a banner or cover.
So the correct way to split the mode should be to only split pictures with W/H ratio greater than 1 and less than 2 (actually it should be more strict, such as 1.8 or 1.9). Images larger than the split limit should be automatically rotated.
This split limit can be determined by the user just like the crop limit.
I use go-comic every day, so I frequently submit issues recently to find a perfect solution for kindle comics.
When I split this kind of large image, each of the split still have W>H. Which is not the case if it's a double page. This may indicate the image is a large band. You first image visually looks like a double page. But we have 692 px after cutting in half, which result in W>H.
For the cover, usually when there is no clear cover from the source, we should disable the hascover. This will take the first picture as a cover, and duplicate it.
When the hascover is activated, there is no duplicate of the cover.
First, I will try to this the issue with space once and for all. Got some idea, but I need to experiment it. Thanks for the example here, it will help me debug.
As for split double page, I think in case of "portrait only", we could activate the autorotate on the split pages, this way it will be easier to read. It should feet when the W > 2*H (or W>H after split).
When you want to disable the split of a large band, it mean you see it on the kindle, without any zoom then. So except if you are using the zoom panel, sometimes it may be difficult to read. I would suggest to cut and rotate each split instead.
I will play with this file.
Don't worry to be active on bug reporting, you are helping making this tools better.
In the pipe:
- webtoon support
- make the epub generator as a library, usuable outside this tools
Hi,
I've made a quick fix with 291c8983a455c878a91e2c2a49b2563bfe970243
It fix the issue with double space, but it's perfectible:
- title should use full page if double page
- cover is not in the center on the thumbnail
I will take a few days to test the existing two-page comics. Thank you for your update.
There is an error in the '-aspect-ratio' of 291c898 version.
Before that, if we add '-aspect-ratio x.x', the 2 pictures in landscape mode will be centered.
If we do not add '-aspect-ratio x.x', the 2 pictures will be displayed on the edge
Now the picture cannot be centered. The picture is always displayed on the edge in landscape mode, whether or not the '-aspect-ratio' is added.