Documentation
¶
Index ¶
- type GrayA
- func (p *GrayA) At(x, y int) color.Color
- func (p *GrayA) Bounds() image.Rectangle
- func (p *GrayA) ColorModel() color.Model
- func (p *GrayA) GrayAAt(x, y int) ccolor.GrayA
- func (p *GrayA) Opaque() bool
- func (p *GrayA) PixOffset(x, y int) int
- func (p *GrayA) Set(x, y int, c color.Color)
- func (p *GrayA) SetGrayA(x, y int, c ccolor.GrayA)
- func (p *GrayA) SubImage(r image.Rectangle) image.Image
- type GrayA32
- func (p *GrayA32) At(x, y int) color.Color
- func (p *GrayA32) Bounds() image.Rectangle
- func (p *GrayA32) ColorModel() color.Model
- func (p *GrayA32) GrayA32At(x, y int) ccolor.GrayA32
- func (p *GrayA32) Opaque() bool
- func (p *GrayA32) PixOffset(x, y int) int
- func (p *GrayA32) Set(x, y int, c color.Color)
- func (p *GrayA32) SetGrayA32(x, y int, c ccolor.GrayA32)
- func (p *GrayA32) SubImage(r image.Rectangle) image.Image
- type Image
- type ImageEncoding
- type RGB
- func (p *RGB) At(x, y int) color.Color
- func (p *RGB) Bounds() image.Rectangle
- func (p *RGB) ColorModel() color.Model
- func (p *RGB) Opaque() bool
- func (p *RGB) PixOffset(x, y int) int
- func (p *RGB) RGBA64At(x, y int) color.RGBA64
- func (p *RGB) RGBAt(x, y int) ccolor.RGB
- func (p *RGB) Set(x, y int, c color.Color)
- func (p *RGB) SetRGB(x, y int, c ccolor.RGB)
- func (p *RGB) SubImage(r image.Rectangle) image.Image
- type RGB48
- func (p *RGB48) At(x, y int) color.Color
- func (p *RGB48) Bounds() image.Rectangle
- func (p *RGB48) ColorModel() color.Model
- func (p *RGB48) Opaque() bool
- func (p *RGB48) PixOffset(x, y int) int
- func (p *RGB48) RGB48At(x, y int) ccolor.RGB48
- func (p *RGB48) RGBA64At(x, y int) color.RGBA64
- func (p *RGB48) Set(x, y int, c color.Color)
- func (p *RGB48) SetRGB48(x, y int, c ccolor.RGB48)
- func (p *RGB48) SubImage(r image.Rectangle) image.Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrayA ¶
type GrayA struct {
// Pix holds the image's pixels, in Gray, A order. The pixel at
// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*2].
Pix []uint8
// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
Stride int
// Rect is the image's bounds.
Rect image.Rectangle
}
GrayA is an in-memory image whose At method returns color.GrayA values.
func (*GrayA) ColorModel ¶
type GrayA32 ¶
type GrayA32 struct {
// Pix holds the image's pixels, in Gray, A order and big-endian format. The pixel at
// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*4].
Pix []uint8
// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
Stride int
// Rect is the image's bounds.
Rect image.Rectangle
}
GrayA32 is an in-memory image whose At method returns color.RGBA64 values.
func NewGrayA32 ¶
NewGrayA32 returns a new GrayA32 image with the given bounds.
func (*GrayA32) ColorModel ¶
type Image ¶
type Image struct {
Bytes []byte
Mimetype string
image.Config
Mask *Image
// contains filtered or unexported fields
}
Image is a raster image that is loaded lazily. Keeping the original bytes allows the renderer to optimize rendering in some cases.
func NewJPEGImage ¶
NewJPEGImage parses a JPEG image.
func NewJPEGMaskedImage ¶
NewJPEGMaskedImage parses a JPEG image and a separate mask. This allows for a brightness-only JPEG to act as mask.
func (*Image) ColorModel ¶
type ImageEncoding ¶
type ImageEncoding int
ImageEncoding defines whether the embedded image shall be embedded as lossless (typically PNG) or lossy (typically JPG).
const ( Lossless ImageEncoding = iota Lossy )
see ImageEncoding
type RGB ¶
type RGB struct {
// Pix holds the image's pixels, in R, G, B order. The pixel at
// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*3].
Pix []uint8
// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
Stride int
// Rect is the image's bounds.
Rect image.Rectangle
}
RGB is an in-memory image whose At method returns color.RGBA values.
func (*RGB) ColorModel ¶
type RGB48 ¶
type RGB48 struct {
// Pix holds the image's pixels, in R, G, B order and big-endian format. The pixel at
// (x, y) starts at Pix[(y-Rect.Min.Y)*Stride + (x-Rect.Min.X)*6].
Pix []uint8
// Stride is the Pix stride (in bytes) between vertically adjacent pixels.
Stride int
// Rect is the image's bounds.
Rect image.Rectangle
}
RGB48 is an in-memory image whose At method returns color.RGBA64 values.