mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +02:00
split double page if necessary
This commit is contained in:
parent
e8f806141e
commit
259bf6bb7b
@ -154,7 +154,14 @@ func LoadImages(path string, options *ImageOptions) ([]*Image, error) {
|
||||
dst.Bounds().Dy(),
|
||||
}
|
||||
|
||||
if options.AutoSplitDoublePage && src.Bounds().Dx() > src.Bounds().Dy() {
|
||||
// Auto split double page
|
||||
// Except for cover
|
||||
// Only if the src image have width > height and is bigger than the view
|
||||
if img.Id > 0 &&
|
||||
options.AutoSplitDoublePage &&
|
||||
src.Bounds().Dx() > src.Bounds().Dy() &&
|
||||
src.Bounds().Dx() > options.ViewHeight &&
|
||||
src.Bounds().Dy() > options.ViewWidth {
|
||||
gifts := NewGiftSplitDoublePage(options)
|
||||
for i, g := range gifts {
|
||||
part := i + 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user