Documentation ¶
Overview ¶
Package graphicx Created by xuzhuoxi on 2019-05-29. @author xuzhuoxi
Package graphicx Created by xuzhuoxi on 2019-05-29. @author xuzhuoxi
Index ¶
- Variables
- func ARGB2Pixel(A, R, G, B uint8) (pixel uint32)
- func ARGB2Pixel64(A, R, G, B uint16) (pixel uint64)
- func BlendRGBANormal(Dr, Dg, Db, Da uint32, S uint32) (targetR, targetG, targetB uint32)
- func Chroma(R, G, B uint32) (V float64)
- func Chrominance(R, G, B uint32) (U float64)
- func Color2Pixel(c color.Color) uint32
- func Color2Pixel64(c color.Color) uint64
- func Color32To64(pixelUnit uint32) uint32
- func Color32ToFloat(pixelUnit uint32) float64
- func Color64To32(pixelUnit uint32) uint32
- func Color64ToFloat(pixelUnit uint32) float64
- func ColorFloatTo32(pixelUnit float64) uint32
- func ColorFloatTo64(pixelUnit float64) uint32
- func GetAlpha(c color.Color) (A uint32)
- func GetBlue(c color.Color) (B uint32)
- func GetGreen(c color.Color) (G uint32)
- func GetRed(c color.Color) (R uint32)
- func GrayColor(c color.Color, algMode GrayAlgMode) color.Color
- func GrayColorDefault(c color.Color) color.Color
- func GrayRGB(R, G, B uint32, algMode GrayAlgMode) uint32
- func GrayWithAverage(R, G, B uint32) uint32
- func GrayWithBitMove(R, G, B uint32) uint32
- func GrayWithFloat(R, G, B uint32) uint32
- func GrayWithGreen(R, G, B uint32) uint32
- func GrayWithInteger(R, G, B uint32) uint32
- func HSV2RGB(H, S, V float64) (R, G, B uint32)
- func Hue(R, G, B uint32) (H float64)
- func Inverse(pixelR, pixelG, pixelB, pixelA uint32) (targetR, targetG, targetB, targetA uint32)
- func Luminance(R, G, B uint32) (Y float64)
- func Pixel2ARGB(pixel uint32) (A, R, G, B uint8)
- func Pixel2ARGB64(pixel uint64) (A, R, G, B uint16)
- func Pixel2RGBA(pixel uint32) (R, G, B, A uint8)
- func Pixel2RGBA64(pixel uint64) (R, G, B, A uint16)
- func RGB2APixel64(R, G, B, A uint16) (pixel uint64)
- func RGB2HSV(R, G, B uint32) (H, S, V float64)
- func RGBA2Pixel(R, G, B, A uint8) (pixel uint32)
- func Saturation(R, G, B uint32) (S float64)
- func ToNRGBA_Black(pixelR, pixelG, pixelB, pixelA uint32) (targetR, targetG, targetB uint32)
- func ToNRGBA_White(pixelR, pixelG, pixelB, pixelA uint32) (targetR, targetG, targetB uint32)
- func Value(R, G, B uint32) (V float64)
- func YUV(R, G, B uint32) (Y, U, V float64)
- type GrayAlgMode
- type Pixel
- type Pixel64
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultAlgMode = BitMove
Functions ¶
func ARGB2Pixel ¶
func ARGB2Pixel64 ¶
func BlendRGBANormal ¶
BlendRGBANormal 混全两个像素,使用normal模式 使用纯黑或纯白作背景色,可实现去除前景Alpha通道功能 使用64位图像数据,R,G,B的值范围为uint16 R = D*Da + S*(1-Da)
func Chrominance ¶
Chrominance 色度U [0,1] U = -0.14713*R - 0.28886*G + 0.436*B
func Color2Pixel ¶
func Color2Pixel64 ¶
func ColorFloatTo64 ¶
func Pixel2ARGB ¶
func Pixel2ARGB64 ¶
func Pixel2RGBA ¶
func Pixel2RGBA64 ¶
func RGB2APixel64 ¶
func RGBA2Pixel ¶
func ToNRGBA_Black ¶
ToNRGBA_Black RGBA颜色转NRGBA,使用黑色作底
func ToNRGBA_White ¶
ToNRGBA_White RGBA颜色转NRGBA,使用白色作底
Types ¶
type GrayAlgMode ¶
type GrayAlgMode uint8
const ( Green GrayAlgMode = iota + 1 Average BitMove Integer Float )
Click to show internal directories.
Click to hide internal directories.