mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +02:00
cut more each side of doublepage split in portrait only
This commit is contained in:
parent
27d617640a
commit
62fc520ebb
@ -178,6 +178,12 @@ func (e *EPUBImageProcessor) transformImage(input *task, part int, right bool) *
|
||||
src := input.Image
|
||||
srcBounds := src.Bounds()
|
||||
|
||||
// In portrait only, we don't need to keep aspect ratio between each split.
|
||||
// We first cut, the crop.
|
||||
if part > 0 && e.Image.View.PortraitOnly {
|
||||
g.Add(epubimagefilters.CropSplitDoublePage(right))
|
||||
}
|
||||
|
||||
// Lookup for margin if crop is enable or if we want to remove blank image
|
||||
if e.Image.Crop.Enabled || e.Image.NoBlankImage {
|
||||
f := epubimagefilters.AutoCrop(
|
||||
@ -201,7 +207,9 @@ func (e *EPUBImageProcessor) transformImage(input *task, part int, right bool) *
|
||||
}
|
||||
}
|
||||
|
||||
if part > 0 {
|
||||
// With landscape support, we need to keep aspect ratio between each split
|
||||
// We first crop, then cut
|
||||
if part > 0 && !e.Image.View.PortraitOnly {
|
||||
g.Add(epubimagefilters.CropSplitDoublePage(right))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user