28 lines
931 B
Go
28 lines
931 B
Go
// webpstub(package webp)是 chai2010/webp 的本地编译桩:仅用于在缺少 libwebp 的
|
||
// Windows 沙箱中通过 `go build -overlay` 替换 chai2010/webp 的全部源文件,
|
||
// 从而让真实的 internal/storage/s3.go(而非桩)参与完整类型检查。
|
||
// 仅覆盖项目实际用到的 API。
|
||
package webp
|
||
|
||
import (
|
||
"image"
|
||
"io"
|
||
)
|
||
|
||
// Options 与 github.com/chai2010/webp 的 Options 字段保持兼容。
|
||
type Options struct {
|
||
Lossless bool
|
||
Quality float32
|
||
Exact bool
|
||
}
|
||
|
||
// Encode 是 webp.Encode 的签名兼容桩(类型检查期间不会被真正调用)。
|
||
func Encode(w io.Writer, m image.Image, o *Options) error {
|
||
return nil
|
||
}
|
||
|
||
// DecodeConfig / Decode 保留解码入口签名,供 s3.go 的 image.Decode 分派路径类型检查。
|
||
func DecodeConfig(r io.Reader) (image.Config, error) { return image.Config{}, nil }
|
||
|
||
func Decode(r io.Reader) (image.Image, error) { return nil, nil }
|