From 84e4d32f7266a0345fc6394449692cc540495df7 Mon Sep 17 00:00:00 2001 From: celogeek <65178+celogeek@users.noreply.github.com> Date: Mon, 16 Jan 2023 08:58:09 +0100 Subject: [PATCH] remove blank image --- internal/epub/image_processing.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/epub/image_processing.go b/internal/epub/image_processing.go index 1eb3cd9..e70e2b6 100644 --- a/internal/epub/image_processing.go +++ b/internal/epub/image_processing.go @@ -187,7 +187,9 @@ func LoadImages(path string, options *ImageOptions) ([]*Image, error) { bar := NewBar(imageCount, "Processing", 1, 2) for image := range imageOutput { - images = append(images, image) + if !(options.NoBlankPage && image.Width == 1 && image.Height == 1) { + images = append(images, image) + } if image.Part == 0 { bar.Add(1) }