mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 07:42:37 +02:00
crop double page after autocrop
fix landscape display when each side can be cut differently. A doublepage is 1 big image, and should be cut as one.
This commit is contained in:
parent
f7f8680eb3
commit
f9ebe71b9e
@ -178,10 +178,6 @@ func (e *EPUBImageProcessor) transformImage(input *task, part int, right bool) *
|
||||
src := input.Image
|
||||
srcBounds := src.Bounds()
|
||||
|
||||
if part > 0 {
|
||||
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(
|
||||
@ -205,6 +201,10 @@ func (e *EPUBImageProcessor) transformImage(input *task, part int, right bool) *
|
||||
}
|
||||
}
|
||||
|
||||
if part > 0 {
|
||||
g.Add(epubimagefilters.CropSplitDoublePage(right))
|
||||
}
|
||||
|
||||
dstBounds := g.Bounds(src.Bounds())
|
||||
// Original && Cropped version need to landscape oriented
|
||||
// Only part 0 can be a double page
|
||||
|
Loading…
x
Reference in New Issue
Block a user