mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +02:00
do not fallback
This commit is contained in:
parent
a3c9667d63
commit
095200a99c
@ -3,7 +3,6 @@
|
||||
package epubimageprocessor
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"image"
|
||||
_ "image/jpeg"
|
||||
_ "image/png"
|
||||
@ -20,10 +19,6 @@ func DecodeImage(name string, f io.ReadCloser) (img image.Image, err error) {
|
||||
switch strings.ToLower(filepath.Ext(name)) {
|
||||
case ".jpeg", ".jpg":
|
||||
img, err = turbojpeg.Decode(f, &turbojpeg.DecoderOptions{})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
img, _, err = image.Decode(f)
|
||||
}
|
||||
default:
|
||||
img, _, err = image.Decode(f)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user