Documentation ¶
Overview ¶
Package img 图像处理
Index ¶
- func AiCrop(ctx *miniprogram.Miniprogram, payload []byte, params url.Values) (resp []byte, err error)
- func ScanQRCode(ctx *miniprogram.Miniprogram, payload []byte, params url.Values) (resp []byte, err error)
- func Superresolution(ctx *miniprogram.Miniprogram, payload []byte, params url.Values) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AiCrop ¶
func AiCrop(ctx *miniprogram.Miniprogram, payload []byte, params url.Values) (resp []byte, err error)
本接口提供基于小程序的图片智能裁剪能力。
See: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/img/img.aiCrop.html
POST https://api.weixin.qq.com/cv/img/aicrop?img_url=ENCODE_URL&access_token=ACCESS_TOCKEN
Example ¶
package main import ( "fmt" "net/url" "github.com/fastwego/miniprogram" "github.com/fastwego/miniprogram/apis/img" ) func main() { var ctx *miniprogram.Miniprogram payload := []byte("{}") params := url.Values{} resp, err := img.AiCrop(ctx, payload, params) fmt.Println(resp, err) }
Output:
func ScanQRCode ¶
func ScanQRCode(ctx *miniprogram.Miniprogram, payload []byte, params url.Values) (resp []byte, err error)
本接口提供基于小程序的条码/二维码识别的API。
See: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/img/img.scanQRCode.html
POST https://api.weixin.qq.com/cv/img/qrcode?img_url=ENCODE_URL&access_token=ACCESS_TOCKEN
Example ¶
package main import ( "fmt" "net/url" "github.com/fastwego/miniprogram" "github.com/fastwego/miniprogram/apis/img" ) func main() { var ctx *miniprogram.Miniprogram payload := []byte("{}") params := url.Values{} resp, err := img.ScanQRCode(ctx, payload, params) fmt.Println(resp, err) }
Output:
func Superresolution ¶
func Superresolution(ctx *miniprogram.Miniprogram, payload []byte, params url.Values) (resp []byte, err error)
本接口提供基于小程序的图片高清化能力。
See: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/img/img.superresolution.html
POST https://api.weixin.qq.com/cv/img/superresolution?img_url=ENCODE_URL&access_token=ACCESS_TOCKEN
Example ¶
package main import ( "fmt" "net/url" "github.com/fastwego/miniprogram" "github.com/fastwego/miniprogram/apis/img" ) func main() { var ctx *miniprogram.Miniprogram payload := []byte("{}") params := url.Values{} resp, err := img.Superresolution(ctx, payload, params) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.