mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 16:22:37 +02:00
fix autosplit double page
only check source width > height
This commit is contained in:
parent
07e04e514b
commit
7eebd18538
@ -121,9 +121,7 @@ func LoadImages(o *Options) ([]*epubimage.Image, error) {
|
|||||||
Width: dst.Bounds().Dx(),
|
Width: dst.Bounds().Dx(),
|
||||||
Height: dst.Bounds().Dy(),
|
Height: dst.Bounds().Dy(),
|
||||||
IsCover: img.Id == 0,
|
IsCover: img.Id == 0,
|
||||||
DoublePage: src.Bounds().Dx() > src.Bounds().Dy() &&
|
DoublePage: src.Bounds().Dx() > src.Bounds().Dy(),
|
||||||
src.Bounds().Dx() > o.Image.ViewHeight &&
|
|
||||||
src.Bounds().Dy() > o.Image.ViewWidth,
|
|
||||||
Path: img.Path,
|
Path: img.Path,
|
||||||
Name: img.Name,
|
Name: img.Name,
|
||||||
}
|
}
|
||||||
@ -133,9 +131,7 @@ func LoadImages(o *Options) ([]*epubimage.Image, error) {
|
|||||||
// Only if the src image have width > height and is bigger than the view
|
// Only if the src image have width > height and is bigger than the view
|
||||||
if (!o.Image.HasCover || img.Id > 0) &&
|
if (!o.Image.HasCover || img.Id > 0) &&
|
||||||
o.Image.AutoSplitDoublePage &&
|
o.Image.AutoSplitDoublePage &&
|
||||||
src.Bounds().Dx() > src.Bounds().Dy() &&
|
src.Bounds().Dx() > src.Bounds().Dy() {
|
||||||
src.Bounds().Dx() > o.Image.ViewHeight &&
|
|
||||||
src.Bounds().Dy() > o.Image.ViewWidth {
|
|
||||||
gifts := epubimage.NewGiftSplitDoublePage(o.Image)
|
gifts := epubimage.NewGiftSplitDoublePage(o.Image)
|
||||||
for i, g := range gifts {
|
for i, g := range gifts {
|
||||||
part := i + 1
|
part := i + 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user