mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 08:12:36 +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(),
|
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)
|
gifts := NewGiftSplitDoublePage(options)
|
||||||
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