mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-26 15:50:47 -05:00
21 lines
323 B
Go
21 lines
323 B
Go
//go:build enable_vips
|
|
|
|
package preprocessor
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/davidbyttow/govips/v2/vips"
|
|
)
|
|
|
|
func init() {
|
|
vips.LoggingSettings(nil, vips.LogLevelError)
|
|
}
|
|
|
|
type ImageDecoder struct{}
|
|
|
|
func (v ImageDecoder) Convert(r io.Reader) (interface{}, error) {
|
|
img, err := vips.NewImageFromReader(r)
|
|
return img, err
|
|
}
|