imageService

package
v0.2.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2022 License: MulanPSL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RGBMESSAGE = "RgbMessage"
	RGBTOIMAGE = "RgbToImage"
)

Variables

View Source
var (
	OutArg     string
	ImageUrl   string
	IP         net.IP
	BucketName string
	FileType   string
	UssHost2   string
	AppID      int
)

Functions

func Enhance added in v0.2.5

func Enhance(rgb []byte, width uint32, height uint32, stride uint32) ([]byte, error)

func Uninit added in v0.2.5

func Uninit() error

Types

type ImageService

type ImageService struct {
	Function string
	Commands []interface{}
}

ImageService 结构体

func NewImageService

func NewImageService() *ImageService

NewImageService 创建新的图像服务

func (*ImageService) GetResult

func (img *ImageService) GetResult(fuction string, commands ...interface{}) (res interface{}, err error)

GetResult 获取图像服务结果

func (*ImageService) GetRgbMessage

func (img *ImageService) GetRgbMessage(commands []interface{}) (res RgbData, err error)

GetRgbMessage 将图片转为rgb并输出数据及图片信息服务调用

func (*ImageService) RgbToImage

func (img *ImageService) RgbToImage(commands []interface{}) (res string, err error)

RgbToImage 将rgb数据转化为图片并输出图片地址

type RgbData

type RgbData struct {
	Rgb    []byte
	Stride uint32
	Width  uint32
	Height uint32
}

RgbData 图片转Rgb数据结构

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL