Documentation ¶
Overview ¶
Package imagex Created by xuzhuoxi on 2019-05-31. @author xuzhuoxi
Package imagex Created by xuzhuoxi on 2019-05-31. @author xuzhuoxi
Package imagex Created by xuzhuoxi on 2019-05-31. @author xuzhuoxi
Index ¶
- Constants
- Variables
- func BlendSourceNormal(destinationImg draw.Image, sourceColor color.Color)
- func Copy2PixelImage(src image.Image, dst *PixelImage)
- func Copy2PixelImage64(src image.Image, dst *PixelImage64)
- func CopyImage(srcImg image.Image) draw.Image
- func CopyImageStruct(srcImg image.Image) draw.Image
- func CopyImageTo(srcImg image.Image, dstImg draw.Image)
- func CopyPixel2Image(src *PixelImage, dst draw.Image)
- func CopyPixel642Image(src *PixelImage64, dst draw.Image)
- func FillImage(img draw.Image, color color.Color)
- func FillImageAt(img draw.Image, color color.Color, rect image.Rectangle)
- func ForEachLoc(img image.Image, eachFunc func(x, y int))
- func LoadImage(fullPath string, format formatx.ImageFormat) (img image.Image, imgFormat string, err error)
- func NewGray(rect image.Rectangle, grayY uint8) *image.Gray
- func NewGray16(rect image.Rectangle, grayY uint16) *image.Gray16
- func NewNRGBA(rect image.Rectangle, defaultColor color.Color) *image.NRGBA
- func NewNRGBA64(rect image.Rectangle, defaultColor color.Color) *image.NRGBA64
- func NewRGBA(rect image.Rectangle, defaultColor color.Color) *image.RGBA
- func NewRGBA64(rect image.Rectangle, cdefaultColor color.Color) *image.RGBA64
- func SaveImage(img image.Image, fullPath string, format formatx.ImageFormat, ...) error
- func SprintImage(img image.Image) string
- func XCopyImage(srcImg image.Image) draw.Image
- func XCopyImageTo(srcImg image.Image, dstImg draw.Image)
- type ARGB64ChanImage
- type ARGBChanImage
- type Gray16ChanImage
- type GrayChanImage
- type IPixelChanImage
- type Pixel64ChanImage
- func (p *Pixel64ChanImage) ChanValueAt(x, y int, chanNum int) uint16
- func (p *Pixel64ChanImage) ChanValuesAt(x, y int) []uint16
- func (p *Pixel64ChanImage) Max() (maxX, maxY int)
- func (p *Pixel64ChanImage) NumberChanel() int
- func (p *Pixel64ChanImage) PixelAt(x, y int) uint32
- func (p *Pixel64ChanImage) SetChanValue(x, y int, chanNum int, value uint16)
- func (p *Pixel64ChanImage) SetChanValues(x, y int, value ...uint16)
- type PixelChanImage
- func (p *PixelChanImage) ChanValueAt(x, y int, chanNum int) uint8
- func (p *PixelChanImage) ChanValuesAt(x, y int) []uint8
- func (p *PixelChanImage) Max() (maxX, maxY int)
- func (p *PixelChanImage) NumberChanel() int
- func (p *PixelChanImage) PixelAt(x, y int) uint32
- func (p *PixelChanImage) SetChanValue(x, y int, chanNum int, value uint8)
- func (p *PixelChanImage) SetChanValues(x, y int, value ...uint8)
- type PixelDirection
- func (d PixelDirection) IncludeDirection(direction PixelDirection) bool
- func (d PixelDirection) IsMulti() bool
- func (d PixelDirection) IsNone() bool
- func (d PixelDirection) IsSingle() bool
- func (d PixelDirection) Name() string
- func (d PixelDirection) ReverseDirection() PixelDirection
- func (d PixelDirection) String() string
- type PixelDirectionAdd
- type PixelImage
- func (i *PixelImage) At(x, y int) uint32
- func (i *PixelImage) ForEachPixel(eachFunc func(x, y int))
- func (i *PixelImage) IndexAt(index int) uint32
- func (i *PixelImage) IndexSet(index int, pixel uint32)
- func (i *PixelImage) IndexSetPixel(index int, pixel graphicx.Pixel)
- func (i *PixelImage) Max() (maxX, maxY int)
- func (i *PixelImage) PixelAt(x, y int) graphicx.Pixel
- func (i *PixelImage) PixelIndexAt(index int) graphicx.Pixel
- func (i *PixelImage) Set(x, y int, pixel uint32)
- func (i *PixelImage) SetPixel(x, y int, pixel graphicx.Pixel)
- type PixelImage64
- func (i *PixelImage64) At(x, y int) uint64
- func (i *PixelImage64) ForEachPixel(eachFunc func(x, y int))
- func (i *PixelImage64) IndexAt(index int) uint64
- func (i *PixelImage64) IndexSet(index int, pixel uint64)
- func (i *PixelImage64) IndexSetPixel(index int, pixel graphicx.Pixel64)
- func (i *PixelImage64) Max() (maxX, maxY int)
- func (i *PixelImage64) PixelAt(x, y int) graphicx.Pixel64
- func (i *PixelImage64) PixelIndexAt(index int) graphicx.Pixel64
- func (i *PixelImage64) Set(x, y int, pixel uint64)
- func (i *PixelImage64) SetPixel(x, y int, pixel graphicx.Pixel64)
- type RGB64ChanImage
- type RGBChanImage
Constants ¶
Variables ¶
View Source
var ( LeftDirAdd = PixelDirectionAdd{-1, 0} LeftUpDirAdd = PixelDirectionAdd{-1, -1} UpDirAdd = PixelDirectionAdd{0, -1} RightUpDirAdd = PixelDirectionAdd{1, -1} RightDirAdd = PixelDirectionAdd{1, 0} RightDownDirAdd = PixelDirectionAdd{1, 1} DownDirAdd = PixelDirectionAdd{0, 1} LeftDownDirAdd = PixelDirectionAdd{-1, 1} )
Functions ¶
func BlendSourceNormal ¶
BlendSourceNormal 增加背景色 背景色的透明通道会被忽略 R = S*(1-Da) + D*Da [0,1]
func Copy2PixelImage ¶
func Copy2PixelImage(src image.Image, dst *PixelImage)
func Copy2PixelImage64 ¶
func Copy2PixelImage64(src image.Image, dst *PixelImage64)
func CopyPixel2Image ¶
func CopyPixel2Image(src *PixelImage, dst draw.Image)
func CopyPixel642Image ¶
func CopyPixel642Image(src *PixelImage64, dst draw.Image)
func FillImageAt ¶
FillImageAt 使用颜色填充图像部分区域
func ForEachLoc ¶
func NewNRGBA64 ¶
NewNRGBA64 新建RGBA64图像
Types ¶
type ARGB64ChanImage ¶
type ARGB64ChanImage struct {
Pixel64ChanImage
}
func (*ARGB64ChanImage) ARGB64At ¶
func (p *ARGB64ChanImage) ARGB64At(x, y int) (A, R, G, B uint16)
func (*ARGB64ChanImage) Pixel64At ¶
func (p *ARGB64ChanImage) Pixel64At(x, y int) (pixel uint64)
func (*ARGB64ChanImage) SetARGB64 ¶
func (p *ARGB64ChanImage) SetARGB64(x, y int, A, R, G, B uint16)
func (*ARGB64ChanImage) SetPixel64 ¶
func (p *ARGB64ChanImage) SetPixel64(x, y int, pixel uint64)
type ARGBChanImage ¶
type ARGBChanImage struct {
PixelChanImage
}
func (*ARGBChanImage) ARGBAt ¶
func (p *ARGBChanImage) ARGBAt(x, y int) (A, R, G, B uint8)
func (*ARGBChanImage) PixelAt ¶
func (p *ARGBChanImage) PixelAt(x, y int) (pixel uint32)
func (*ARGBChanImage) SetARGB ¶
func (p *ARGBChanImage) SetARGB(x, y int, A, R, G, B uint8)
func (*ARGBChanImage) SetPixel ¶
func (p *ARGBChanImage) SetPixel(x, y int, pixel uint32)
type Gray16ChanImage ¶
type Gray16ChanImage struct {
Pixel64ChanImage
}
func (*Gray16ChanImage) Gray16At ¶
func (p *Gray16ChanImage) Gray16At(x, y int) uint16
func (*Gray16ChanImage) SetGray16 ¶
func (p *Gray16ChanImage) SetGray16(x, y int, gray uint16)
type GrayChanImage ¶
type GrayChanImage struct {
PixelChanImage
}
func (*GrayChanImage) GrayAt ¶
func (p *GrayChanImage) GrayAt(x, y int) uint8
func (*GrayChanImage) SetGray ¶
func (p *GrayChanImage) SetGray(x, y int, gray uint8)
type IPixelChanImage ¶
type Pixel64ChanImage ¶
func (*Pixel64ChanImage) ChanValueAt ¶
func (p *Pixel64ChanImage) ChanValueAt(x, y int, chanNum int) uint16
func (*Pixel64ChanImage) ChanValuesAt ¶
func (p *Pixel64ChanImage) ChanValuesAt(x, y int) []uint16
func (*Pixel64ChanImage) Max ¶
func (p *Pixel64ChanImage) Max() (maxX, maxY int)
func (*Pixel64ChanImage) NumberChanel ¶
func (p *Pixel64ChanImage) NumberChanel() int
func (*Pixel64ChanImage) PixelAt ¶
func (p *Pixel64ChanImage) PixelAt(x, y int) uint32
func (*Pixel64ChanImage) SetChanValue ¶
func (p *Pixel64ChanImage) SetChanValue(x, y int, chanNum int, value uint16)
func (*Pixel64ChanImage) SetChanValues ¶
func (p *Pixel64ChanImage) SetChanValues(x, y int, value ...uint16)
type PixelChanImage ¶
func (*PixelChanImage) ChanValueAt ¶
func (p *PixelChanImage) ChanValueAt(x, y int, chanNum int) uint8
func (*PixelChanImage) ChanValuesAt ¶
func (p *PixelChanImage) ChanValuesAt(x, y int) []uint8
func (*PixelChanImage) Max ¶
func (p *PixelChanImage) Max() (maxX, maxY int)
func (*PixelChanImage) NumberChanel ¶
func (p *PixelChanImage) NumberChanel() int
func (*PixelChanImage) PixelAt ¶
func (p *PixelChanImage) PixelAt(x, y int) uint32
func (*PixelChanImage) SetChanValue ¶
func (p *PixelChanImage) SetChanValue(x, y int, chanNum int, value uint8)
func (*PixelChanImage) SetChanValues ¶
func (p *PixelChanImage) SetChanValues(x, y int, value ...uint8)
type PixelDirection ¶
type PixelDirection int
const ( Left PixelDirection = 1 << iota LeftUp Up RightUp Right RightDown Down LeftDown )
func DecomposeDirection ¶
func DecomposeDirection(directions PixelDirection) []PixelDirection
DecomposeDirection 分解方向
func (PixelDirection) IncludeDirection ¶
func (d PixelDirection) IncludeDirection(direction PixelDirection) bool
IncludeDirection 包含方向
func (PixelDirection) Name ¶
func (d PixelDirection) Name() string
func (PixelDirection) ReverseDirection ¶
func (d PixelDirection) ReverseDirection() PixelDirection
ReverseDirection 取反方向
func (PixelDirection) String ¶
func (d PixelDirection) String() string
type PixelDirectionAdd ¶
type PixelDirectionAdd struct{ X, Y int }
PixelDirectionAdd 方向偏移量
func GetPixelDirectionAdd ¶
func GetPixelDirectionAdd(direction PixelDirection) (PixelDirectionAdd, error)
GetPixelDirectionAdd 取方向坐标增加值
func GetPixelDirectionAdds ¶
func GetPixelDirectionAdds(directions PixelDirection) []PixelDirectionAdd
GetPixelDirectionAdds 取多方向坐标增加值
type PixelImage ¶
func NewPixelImage ¶
func NewPixelImage(width, height int, pixel uint32) *PixelImage
func (*PixelImage) At ¶
func (i *PixelImage) At(x, y int) uint32
func (*PixelImage) ForEachPixel ¶
func (i *PixelImage) ForEachPixel(eachFunc func(x, y int))
func (*PixelImage) IndexAt ¶
func (i *PixelImage) IndexAt(index int) uint32
func (*PixelImage) IndexSet ¶
func (i *PixelImage) IndexSet(index int, pixel uint32)
func (*PixelImage) IndexSetPixel ¶
func (i *PixelImage) IndexSetPixel(index int, pixel graphicx.Pixel)
func (*PixelImage) Max ¶
func (i *PixelImage) Max() (maxX, maxY int)
func (*PixelImage) PixelIndexAt ¶
func (i *PixelImage) PixelIndexAt(index int) graphicx.Pixel
func (*PixelImage) Set ¶
func (i *PixelImage) Set(x, y int, pixel uint32)
type PixelImage64 ¶
func NewPixelImage64 ¶
func NewPixelImage64(width, height int, pixel uint64) *PixelImage64
func (*PixelImage64) At ¶
func (i *PixelImage64) At(x, y int) uint64
func (*PixelImage64) ForEachPixel ¶
func (i *PixelImage64) ForEachPixel(eachFunc func(x, y int))
func (*PixelImage64) IndexAt ¶
func (i *PixelImage64) IndexAt(index int) uint64
func (*PixelImage64) IndexSet ¶
func (i *PixelImage64) IndexSet(index int, pixel uint64)
func (*PixelImage64) IndexSetPixel ¶
func (i *PixelImage64) IndexSetPixel(index int, pixel graphicx.Pixel64)
func (*PixelImage64) Max ¶
func (i *PixelImage64) Max() (maxX, maxY int)
func (*PixelImage64) PixelIndexAt ¶
func (i *PixelImage64) PixelIndexAt(index int) graphicx.Pixel64
func (*PixelImage64) Set ¶
func (i *PixelImage64) Set(x, y int, pixel uint64)
type RGB64ChanImage ¶
type RGB64ChanImage struct {
Pixel64ChanImage
}
func (*RGB64ChanImage) Pixel64At ¶
func (p *RGB64ChanImage) Pixel64At(x, y int) (pixel uint64)
func (*RGB64ChanImage) RGB64At ¶
func (p *RGB64ChanImage) RGB64At(x, y int) (R, G, B uint16)
func (*RGB64ChanImage) SetPixel64 ¶
func (p *RGB64ChanImage) SetPixel64(x, y int, pixel uint64)
func (*RGB64ChanImage) SetRGB64 ¶
func (p *RGB64ChanImage) SetRGB64(x, y int, R, G, B uint16)
type RGBChanImage ¶
type RGBChanImage struct {
PixelChanImage
}
func (*RGBChanImage) PixelAt ¶
func (p *RGBChanImage) PixelAt(x, y int) (pixel uint32)
func (*RGBChanImage) RGBAt ¶
func (p *RGBChanImage) RGBAt(x, y int) (R, G, B uint8)
func (*RGBChanImage) SetPixel ¶
func (p *RGBChanImage) SetPixel(x, y int, pixel uint32)
func (*RGBChanImage) SetRGB ¶
func (p *RGBChanImage) SetRGB(x, y int, R, G, B uint8)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Difference of Gaussian 高斯函数差分
|
Difference of Gaussian 高斯函数差分 |
Package filterx 模糊
|
Package filterx 模糊 |
Package formatx Created by xuzhuoxi on 2019-04-26.
|
Package formatx Created by xuzhuoxi on 2019-04-26. |
jpegx
Package jpegx Created by xuzhuoxi on 2019-04-27.
|
Package jpegx Created by xuzhuoxi on 2019-04-27. |
pngx
Package pngx Created by xuzhuoxi on 2019-04-27.
|
Package pngx Created by xuzhuoxi on 2019-04-27. |
webpx
Package webpx Create on 2023/5/3 @author xuzhuoxi
|
Package webpx Create on 2023/5/3 @author xuzhuoxi |
Package projectionx 投影: 按水平或垂直方向统计色素有效性
|
Package projectionx 投影: 按水平或垂直方向统计色素有效性 |
Package resizex Created by xuzhuoxi on 2019-05-31.
|
Package resizex Created by xuzhuoxi on 2019-05-31. |
Click to show internal directories.
Click to hide internal directories.