mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +02:00
support tiff
This commit is contained in:
parent
5e5a07c930
commit
2c372594cc
@ -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 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.
|
The case for extensions doesn't matter.
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"golang.org/x/image/font/gofont/gomonobold"
|
"golang.org/x/image/font/gofont/gomonobold"
|
||||||
|
_ "golang.org/x/image/tiff"
|
||||||
_ "golang.org/x/image/webp"
|
_ "golang.org/x/image/webp"
|
||||||
|
|
||||||
"github.com/fogleman/gg"
|
"github.com/fogleman/gg"
|
||||||
@ -43,7 +44,7 @@ var errNoImagesFound = errors.New("no images found")
|
|||||||
// only accept jpg, png and webp as source file
|
// only accept jpg, png and webp as source file
|
||||||
func (e *EPUBImageProcessor) isSupportedImage(path string) bool {
|
func (e *EPUBImageProcessor) isSupportedImage(path string) bool {
|
||||||
switch strings.ToLower(filepath.Ext(path)) {
|
switch strings.ToLower(filepath.Ext(path)) {
|
||||||
case ".jpg", ".jpeg", ".png", ".webp":
|
case ".jpg", ".jpeg", ".png", ".webp", ".tiff":
|
||||||
{
|
{
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user