diff --git a/internal/epub/imageprocessor/epub_image_processor.go b/internal/epub/imageprocessor/epub_image_processor.go index 3f40d38..4dd811c 100644 --- a/internal/epub/imageprocessor/epub_image_processor.go +++ b/internal/epub/imageprocessor/epub_image_processor.go @@ -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