mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +02:00
fix doublePage issue when part crop are also a double page
This commit is contained in:
parent
2c372594cc
commit
f7f8680eb3
@ -207,9 +207,10 @@ func (e *EPUBImageProcessor) transformImage(input *task, part int, right bool) *
|
|||||||
|
|
||||||
dstBounds := g.Bounds(src.Bounds())
|
dstBounds := g.Bounds(src.Bounds())
|
||||||
// Original && Cropped version need to landscape oriented
|
// Original && Cropped version need to landscape oriented
|
||||||
isDoublePage := srcBounds.Dx() > srcBounds.Dy() && dstBounds.Dx() > dstBounds.Dy()
|
// Only part 0 can be a double page
|
||||||
|
isDoublePage := part == 0 && srcBounds.Dx() > srcBounds.Dy() && dstBounds.Dx() > dstBounds.Dy()
|
||||||
|
|
||||||
if part == 0 && e.Image.AutoRotate && isDoublePage {
|
if e.Image.AutoRotate && isDoublePage {
|
||||||
g.Add(gift.Rotate90())
|
g.Add(gift.Rotate90())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user