Documentation
¶
Index ¶
- Constants
- Variables
- func ColorToRGBAHex(c color.Color) string
- func ColorToRGBHex(c color.Color) string
- func GenerateOneColorImage(w int, h int, c color.Color) *image.RGBA
- func GetColorBlack() (c color.Color)
- func GetColorBlue() (c color.Color)
- func GetColorGreen() (c color.Color)
- func GetColorRed() (c color.Color)
- func GetColorWhite() (c color.Color)
- func MustColorRGBAHexToObj(hex string) (c color.Color)
- func MustDecodeConfigFromFile(path string) (conf image.Config)
- func MustDecodeImageFromByte(content []byte) image.Image
- func MustDecodeImageFromFile(path string) (conf image.Image)
- func MustPngDecodeConfigFromBytes(content []byte) (conf image.Config)
- func MustPngDecodeConfigFromFile(path string) (conf image.Config)
- func MustPngDecodeFromBuf(content []byte) image.Image
- func MustPngEncodeFromGoImageToBytes(img image.Image) []byte
- func MustPngEncodeFromGoImageToFile(img image.Image, inPath string)
- func New() string
- func NewLen(length int) string
- func NewLenChars(length int, chars []byte) string
- func PngDecodeConfigFromFile(path string) (conf image.Config, err error)
- type Image
- type ImageConfig
Constants ¶
View Source
const ( StdLen = 16 UUIDLen = 20 )
Variables ¶
View Source
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
Functions ¶
func ColorToRGBAHex ¶
func ColorToRGBHex ¶
func GetColorBlack ¶
func GetColorBlue ¶
func GetColorGreen ¶
func GetColorRed ¶
func GetColorWhite ¶
func MustColorRGBAHexToObj ¶
func MustDecodeImageFromByte ¶
func MustDecodeImageFromFile ¶
func MustPngDecodeFromBuf ¶
func NewLenChars ¶
Types ¶
type Image ¶
func NewCaptchaImage ¶
type ImageConfig ¶
func DecodeConfigFromByte ¶
func DecodeConfigFromByte(content []byte) (config ImageConfig, err error)
func MustDecodeConfigFromByte ¶
func MustDecodeConfigFromByte(content []byte) (config ImageConfig)
Click to show internal directories.
Click to hide internal directories.