diff --git a/README.md b/README.md index d5c0483..7df0674 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ $ go install github.com/celogeek/go-comic-converter/v2@v2.6.9 The supported image files are jpeg and png from the sources. -The extensions can be: `jpg`, `jpeg`, `png`, `webp`. +The extensions can be: `jpg`, `jpeg`, `png`, `webp`, `tiff`. The case for extensions doesn't matter. diff --git a/internal/epub/imageprocessor/epub_image_processor_loader.go b/internal/epub/imageprocessor/epub_image_processor_loader.go index da610f0..c77241d 100644 --- a/internal/epub/imageprocessor/epub_image_processor_loader.go +++ b/internal/epub/imageprocessor/epub_image_processor_loader.go @@ -18,6 +18,7 @@ import ( "sync" "golang.org/x/image/font/gofont/gomonobold" + _ "golang.org/x/image/tiff" _ "golang.org/x/image/webp" "github.com/fogleman/gg" @@ -43,7 +44,7 @@ var errNoImagesFound = errors.New("no images found") // only accept jpg, png and webp as source file func (e *EPUBImageProcessor) isSupportedImage(path string) bool { switch strings.ToLower(filepath.Ext(path)) { - case ".jpg", ".jpeg", ".png", ".webp": + case ".jpg", ".jpeg", ".png", ".webp", ".tiff": { return true }