From a4c7b87dc010c29fb46d54e4831248c629a80d25 Mon Sep 17 00:00:00 2001 From: Milan Nikolic Date: Tue, 3 Nov 2015 13:37:02 +0100 Subject: [PATCH] add tiff and webp support --- cbconvert.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cbconvert.go b/cbconvert.go index ee3bf2a..9c71180 100644 --- a/cbconvert.go +++ b/cbconvert.go @@ -46,6 +46,8 @@ import ( _ "github.com/hotei/bmp" "github.com/nfnt/resize" "github.com/skarademir/naturalsort" + _ "golang.org/x/image/tiff" + _ "golang.org/x/image/webp" "gopkg.in/alecthomas/kingpin.v2" ) @@ -574,7 +576,7 @@ func getCover(images []string) string { return images[0] } -// Checks if file is comic +// Checks if file is archive func isArchive(f string) bool { var types = []string{".rar", ".zip", ".7z", ".gz", ".bz2", ".cbr", ".cbz", ".cb7", ".cbt"} @@ -599,8 +601,8 @@ func isDocument(f string) bool { // Checks if file is image func isImage(f string) bool { - var types = []string{".jpg", ".jpeg", ".jpe", - ".png", ".gif", ".bmp"} + var types = []string{".jpg", ".jpeg", ".jpe", ".png", + ".gif", ".bmp", ".tiff", ".tif", ".webp"} for _, t := range types { if strings.ToLower(filepath.Ext(f)) == t { return true