Documentation ¶
Index ¶
- Variables
- func AddDataPadding(width, height, bitsPerComponent, colorComponents int, data []byte) ([]byte, error)
- func AutoThresholdTriangle(histogram [256]int) uint8
- func BytesPerLine(width, bitsPerComponent, colorComponents int) int
- func ColorAt(x, y, width, bitsPerColor, colorComponents, bytesPerLine int, ...) (_da.Color, error)
- func ColorAtCMYK(x, y, width int, data []byte, decode []float64) (_da.CMYK, error)
- func ColorAtGray16BPC(x, y, bytesPerLine int, data []byte, decode []float64) (_da.Gray16, error)
- func ColorAtGray1BPC(x, y, bytesPerLine int, data []byte, decode []float64) (_da.Gray, error)
- func ColorAtGray2BPC(x, y, bytesPerLine int, data []byte, decode []float64) (_da.Gray, error)
- func ColorAtGray4BPC(x, y, bytesPerLine int, data []byte, decode []float64) (_da.Gray, error)
- func ColorAtGray8BPC(x, y, bytesPerLine int, data []byte, decode []float64) (_da.Gray, error)
- func ColorAtGrayscale(x, y, bitsPerColor, bytesPerLine int, data []byte, decode []float64) (_da.Color, error)
- func ColorAtNRGBA(x, y, width, bytesPerLine, bitsPerColor int, data, alpha []byte, ...) (_da.Color, error)
- func ColorAtNRGBA16(x, y, width, bytesPerLine int, data, alpha []byte, decode []float64) (_da.NRGBA, error)
- func ColorAtNRGBA32(x, y, width int, data, alpha []byte, decode []float64) (_da.NRGBA, error)
- func ColorAtNRGBA64(x, y, width int, data, alpha []byte, decode []float64) (_da.NRGBA64, error)
- func ColorAtRGBA32(x, y, width int, data, alpha []byte, decode []float64) (_da.RGBA, error)
- func GrayHistogram(g Gray) (_dcad [256]int)
- func ImgToBinary(i _e.Image, threshold uint8) *_e.Gray
- func ImgToGray(i _e.Image) *_e.Gray
- func InDelta(expected, current, delta float64) bool
- func IsGrayImgBlackAndWhite(i *_e.Gray) bool
- func IsPowerOf2(n uint) bool
- func LinearInterpolate(x, xmin, xmax, ymin, ymax float64) float64
- func MonochromeModel(threshold uint8) _da.Model
- func NextPowerOf2(n uint) uint
- func RasterOperation(dest *Monochrome, dx, dy, dw, dh int, op RasterOperator, src *Monochrome, ...) error
- func ScaleAlphaToMonochrome(data []byte, width, height int) ([]byte, error)
- type CMYK
- type CMYK32
- func (_abgg *CMYK32) At(x, y int) _da.Color
- func (_eca *CMYK32) Base() *ImageBase
- func (_fbca *CMYK32) Bounds() _e.Rectangle
- func (_bac *CMYK32) CMYKAt(x, y int) _da.CMYK
- func (_adac *CMYK32) ColorAt(x, y int) (_da.Color, error)
- func (_dge *CMYK32) ColorModel() _da.Model
- func (_agd *CMYK32) Copy() Image
- func (_afb *CMYK32) Set(x, y int, c _da.Color)
- func (_ecf *CMYK32) SetCMYK(x, y int, c _da.CMYK)
- func (_ffba *CMYK32) Validate() error
- type ColorConverter
- type Gray
- type Gray16
- func (_cggg *Gray16) At(x, y int) _da.Color
- func (_bgbcb *Gray16) Base() *ImageBase
- func (_dgfb *Gray16) Bounds() _e.Rectangle
- func (_gdbe *Gray16) ColorAt(x, y int) (_da.Color, error)
- func (_egc *Gray16) ColorModel() _da.Model
- func (_fdfe *Gray16) Copy() Image
- func (_ceac *Gray16) GrayAt(x, y int) _da.Gray
- func (_gcab *Gray16) Histogram() (_gbge [256]int)
- func (_cfad *Gray16) Set(x, y int, c _da.Color)
- func (_adeb *Gray16) SetGray(x, y int, g _da.Gray)
- func (_edd *Gray16) Validate() error
- type Gray2
- func (_aeef *Gray2) At(x, y int) _da.Color
- func (_cdd *Gray2) Base() *ImageBase
- func (_ggd *Gray2) Bounds() _e.Rectangle
- func (_defa *Gray2) ColorAt(x, y int) (_da.Color, error)
- func (_acbd *Gray2) ColorModel() _da.Model
- func (_bca *Gray2) Copy() Image
- func (_egda *Gray2) GrayAt(x, y int) _da.Gray
- func (_dcef *Gray2) Histogram() (_gade [256]int)
- func (_cebd *Gray2) Set(x, y int, c _da.Color)
- func (_degb *Gray2) SetGray(x, y int, gray _da.Gray)
- func (_dggcc *Gray2) Validate() error
- type Gray4
- func (_badab *Gray4) At(x, y int) _da.Color
- func (_ggdc *Gray4) Base() *ImageBase
- func (_ggcc *Gray4) Bounds() _e.Rectangle
- func (_gdeec *Gray4) ColorAt(x, y int) (_da.Color, error)
- func (_egdf *Gray4) ColorModel() _da.Model
- func (_ddfa *Gray4) Copy() Image
- func (_gaf *Gray4) GrayAt(x, y int) _da.Gray
- func (_fbcd *Gray4) Histogram() (_bbgd [256]int)
- func (_ddcfe *Gray4) Set(x, y int, c _da.Color)
- func (_bgcg *Gray4) SetGray(x, y int, g _da.Gray)
- func (_bbag *Gray4) Validate() error
- type Gray8
- func (_fgfb *Gray8) At(x, y int) _da.Color
- func (_dbaa *Gray8) Base() *ImageBase
- func (_ceef *Gray8) Bounds() _e.Rectangle
- func (_ffbf *Gray8) ColorAt(x, y int) (_da.Color, error)
- func (_daaf *Gray8) ColorModel() _da.Model
- func (_cgba *Gray8) Copy() Image
- func (_egad *Gray8) GrayAt(x, y int) _da.Gray
- func (_ddff *Gray8) Histogram() (_ccgf [256]int)
- func (_ecff *Gray8) Set(x, y int, c _da.Color)
- func (_cdg *Gray8) SetGray(x, y int, g _da.Gray)
- func (_eebd *Gray8) Validate() error
- type Histogramer
- type Image
- type ImageBase
- type Monochrome
- func (_efbf *Monochrome) AddPadding() (_effa error)
- func (_gdde *Monochrome) At(x, y int) _da.Color
- func (_aafb *Monochrome) Base() *ImageBase
- func (_adbb *Monochrome) Bounds() _e.Rectangle
- func (_cfda *Monochrome) ColorAt(x, y int) (_da.Color, error)
- func (_adef *Monochrome) ColorModel() _da.Model
- func (_cage *Monochrome) Copy() Image
- func (_ccca *Monochrome) ExpandBinary(factor int) (*Monochrome, error)
- func (_fabbd *Monochrome) GrayAt(x, y int) _da.Gray
- func (_adee *Monochrome) Histogram() (_aefa [256]int)
- func (_adec *Monochrome) InverseData() error
- func (_cee *Monochrome) IsUnpadded() bool
- func (_deaf *Monochrome) RasterOperation(dx, dy, dw, dh int, op RasterOperator, src *Monochrome, sx, sy int) error
- func (_dff *Monochrome) ReduceBinary(factor float64) (*Monochrome, error)
- func (_ggc *Monochrome) ResolveDecode() error
- func (_fff *Monochrome) Scale(scale float64) (*Monochrome, error)
- func (_ecgc *Monochrome) ScaleLow(width, height int) (*Monochrome, error)
- func (_cfc *Monochrome) Set(x, y int, c _da.Color)
- func (_cefbg *Monochrome) SetGray(x, y int, g _da.Gray)
- func (_bgbc *Monochrome) Validate() error
- type NRGBA
- type NRGBA16
- func (_gcgc *NRGBA16) At(x, y int) _da.Color
- func (_cgff *NRGBA16) Base() *ImageBase
- func (_gadc *NRGBA16) Bounds() _e.Rectangle
- func (_efedb *NRGBA16) ColorAt(x, y int) (_da.Color, error)
- func (_ebgf *NRGBA16) ColorModel() _da.Model
- func (_gbba *NRGBA16) Copy() Image
- func (_ecbf *NRGBA16) NRGBAAt(x, y int) _da.NRGBA
- func (_bbc *NRGBA16) Set(x, y int, c _da.Color)
- func (_ccee *NRGBA16) SetNRGBA(x, y int, c _da.NRGBA)
- func (_dadag *NRGBA16) Validate() error
- type NRGBA32
- func (_ddbcc *NRGBA32) At(x, y int) _da.Color
- func (_fdge *NRGBA32) Base() *ImageBase
- func (_eefg *NRGBA32) Bounds() _e.Rectangle
- func (_eceag *NRGBA32) ColorAt(x, y int) (_da.Color, error)
- func (_aab *NRGBA32) ColorModel() _da.Model
- func (_fdff *NRGBA32) Copy() Image
- func (_dabf *NRGBA32) NRGBAAt(x, y int) _da.NRGBA
- func (_gfcda *NRGBA32) Set(x, y int, c _da.Color)
- func (_ffgae *NRGBA32) SetNRGBA(x, y int, c _da.NRGBA)
- func (_cebe *NRGBA32) Validate() error
- type NRGBA64
- func (_aacg *NRGBA64) At(x, y int) _da.Color
- func (_geadaa *NRGBA64) Base() *ImageBase
- func (_bcacf *NRGBA64) Bounds() _e.Rectangle
- func (_ggebf *NRGBA64) ColorAt(x, y int) (_da.Color, error)
- func (_cgfc *NRGBA64) ColorModel() _da.Model
- func (_bbda *NRGBA64) Copy() Image
- func (_gebf *NRGBA64) NRGBA64At(x, y int) _da.NRGBA64
- func (_ccf *NRGBA64) Set(x, y int, c _da.Color)
- func (_fabc *NRGBA64) SetNRGBA64(x, y int, c _da.NRGBA64)
- func (_bcdd *NRGBA64) Validate() error
- type RGBA
- type RGBA32
- func (_dbgf *RGBA32) At(x, y int) _da.Color
- func (_cdfg *RGBA32) Base() *ImageBase
- func (_eaea *RGBA32) Bounds() _e.Rectangle
- func (_ddffc *RGBA32) ColorAt(x, y int) (_da.Color, error)
- func (_abfdd *RGBA32) ColorModel() _da.Model
- func (_ecde *RGBA32) Copy() Image
- func (_bagd *RGBA32) RGBAAt(x, y int) _da.RGBA
- func (_bbcc *RGBA32) Set(x, y int, c _da.Color)
- func (_cebg *RGBA32) SetRGBA(x, y int, c _da.RGBA)
- func (_daddf *RGBA32) Validate() error
- type RasterOperator
- type SMasker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Gray2Model = _da.ModelFunc(_gged) Gray4Model = _da.ModelFunc(_ebfb) NRGBA16Model = _da.ModelFunc(_dcaa) )
View Source
var ( MonochromeConverter = ConverterFunc(_gfb) Gray2Converter = ConverterFunc(_acec) Gray4Converter = ConverterFunc(_bfbf) GrayConverter = ConverterFunc(_feaf) Gray16Converter = ConverterFunc(_afec) NRGBA16Converter = ConverterFunc(_aaacf) NRGBAConverter = ConverterFunc(_aaga) NRGBA64Converter = ConverterFunc(_agaac) RGBAConverter = ConverterFunc(_fddf) CMYKConverter = ConverterFunc(_fedb) )
View Source
var ErrInvalidImage = _b.New("i\u006e\u0076\u0061\u006c\u0069\u0064\u0020\u0069\u006da\u0067\u0065\u0020\u0064\u0061\u0074\u0061 s\u0069\u007a\u0065\u0020f\u006f\u0072\u0020\u0070\u0072\u006f\u0076\u0069\u0064ed\u0020\u0064i\u006d\u0065\u006e\u0073\u0069\u006f\u006e\u0073")
Functions ¶
func AddDataPadding ¶
func AutoThresholdTriangle ¶
func BytesPerLine ¶
func ColorAtCMYK ¶
func ColorAtGray16BPC ¶
func ColorAtGray1BPC ¶
func ColorAtGray2BPC ¶
func ColorAtGray4BPC ¶
func ColorAtGray8BPC ¶
func ColorAtGrayscale ¶
func ColorAtNRGBA ¶
func ColorAtNRGBA16 ¶
func ColorAtNRGBA32 ¶
func ColorAtNRGBA64 ¶
func ColorAtRGBA32 ¶
func GrayHistogram ¶
func IsGrayImgBlackAndWhite ¶
func IsPowerOf2 ¶
func LinearInterpolate ¶
func MonochromeModel ¶
func NextPowerOf2 ¶
func RasterOperation ¶
func RasterOperation(dest *Monochrome, dx, dy, dw, dh int, op RasterOperator, src *Monochrome, sx, sy int) error
Types ¶
type ColorConverter ¶
func ConverterFunc ¶
func ConverterFunc(converterFunc func(_ebd _e.Image) (Image, error)) ColorConverter
func GetConverter ¶
func GetConverter(bitsPerComponent, colorComponents int) (ColorConverter, error)
func MonochromeThresholdConverter ¶
func MonochromeThresholdConverter(threshold uint8) ColorConverter
type Histogramer ¶
type Histogramer interface{ Histogram() [256]int }
type Image ¶
type ImageBase ¶
type ImageBase struct {
Width, Height int
BitsPerComponent, ColorComponents int
Data, Alpha []byte
Decode []float64
BytesPerLine int
}
func NewImageBase ¶
type Monochrome ¶
func (*Monochrome) AddPadding ¶
func (_efbf *Monochrome) AddPadding() (_effa error)
func (*Monochrome) Base ¶
func (_aafb *Monochrome) Base() *ImageBase
func (*Monochrome) Bounds ¶
func (_adbb *Monochrome) Bounds() _e.Rectangle
func (*Monochrome) ColorModel ¶
func (_adef *Monochrome) ColorModel() _da.Model
func (*Monochrome) Copy ¶
func (_cage *Monochrome) Copy() Image
func (*Monochrome) ExpandBinary ¶
func (_ccca *Monochrome) ExpandBinary(factor int) (*Monochrome, error)
func (*Monochrome) Histogram ¶
func (_adee *Monochrome) Histogram() (_aefa [256]int)
func (*Monochrome) InverseData ¶
func (_adec *Monochrome) InverseData() error
func (*Monochrome) IsUnpadded ¶
func (_cee *Monochrome) IsUnpadded() bool
func (*Monochrome) RasterOperation ¶
func (_deaf *Monochrome) RasterOperation(dx, dy, dw, dh int, op RasterOperator, src *Monochrome, sx, sy int) error
func (*Monochrome) ReduceBinary ¶
func (_dff *Monochrome) ReduceBinary(factor float64) (*Monochrome, error)
func (*Monochrome) ResolveDecode ¶
func (_ggc *Monochrome) ResolveDecode() error
func (*Monochrome) Scale ¶
func (_fff *Monochrome) Scale(scale float64) (*Monochrome, error)
func (*Monochrome) ScaleLow ¶
func (_ecgc *Monochrome) ScaleLow(width, height int) (*Monochrome, error)
func (*Monochrome) Validate ¶
func (_bgbc *Monochrome) Validate() error
type RasterOperator ¶
type RasterOperator int
const ( PixSrc RasterOperator = 0xc PixDst RasterOperator = 0xa PixNotSrc RasterOperator = 0x3 PixNotDst RasterOperator = 0x5 PixClr RasterOperator = 0x0 PixSet RasterOperator = 0xf PixSrcOrDst RasterOperator = 0xe PixSrcAndDst RasterOperator = 0x8 PixSrcXorDst RasterOperator = 0x6 PixNotSrcOrDst RasterOperator = 0xb PixNotSrcAndDst RasterOperator = 0x2 PixSrcOrNotDst RasterOperator = 0xd PixSrcAndNotDst RasterOperator = 0x4 PixNotPixSrcOrDst RasterOperator = 0x1 PixNotPixSrcAndDst RasterOperator = 0x7 PixNotPixSrcXorDst RasterOperator = 0x9 PixPaint = PixSrcOrDst PixSubtract = PixNotSrcAndDst PixMask = PixSrcAndDst )
Click to show internal directories.
Click to hide internal directories.