Namespace: go.std.image
v1.0Contents
Summary
Provides a low-level interface to the image package.
Package image implements a basic 2-D image library.
The fundamental interface is called Image. An Image contains colors, which
are described in the image/color package.
Values of the Image interface are created either by calling functions such
as NewRGBA and NewPaletted, or by calling Decode on an io.Reader containing
image data in a format such as GIF, JPEG or PNG. Decoding any particular
image format requires the prior registration of a decoder function.
Registration is typically automatic as a side effect of initializing that
format's package so that, to decode a PNG image, it suffices to have
import _ "image/png"
in a program's main package. The _ means to import a package purely for its
initialization side effects.
See "The Go image package" for more details:
https://golang.org/doc/articles/image_package.html
Index
- *Alpha
- *Alpha16
- *CMYK
- *Config
- *Gray
- *Gray16
- *NRGBA
- *NRGBA64
- *NYCbCrA
- *Paletted
- *Point
- *RGBA
- *RGBA64
- *Rectangle
- *Uniform
- *YCbCr
- *YCbCrSubsampleRatio
- Alpha
- Alpha16
- Black
- CMYK
- Config
- Decode
- DecodeConfig
- ErrFormat
- Gray
- Gray16
- Image
- NRGBA
- NRGBA64
- NYCbCrA
- NewAlpha
- NewAlpha16
- NewCMYK
- NewGray
- NewGray16
- NewNRGBA
- NewNRGBA64
- NewNYCbCrA
- NewPaletted
- NewRGBA
- NewRGBA64
- NewUniform
- NewYCbCr
- Opaque
- Paletted
- PalettedImage
- Point
- Pt
- RGBA
- RGBA64
- RGBA64Image
- Rect
- Rectangle
- Transparent
- Uniform
- White
- YCbCr
- YCbCrSubsampleRatio
- YCbCrSubsampleRatio410
- YCbCrSubsampleRatio411
- YCbCrSubsampleRatio420
- YCbCrSubsampleRatio422
- YCbCrSubsampleRatio440
- YCbCrSubsampleRatio444
- ZP
- ZR
- arrayOfAlpha
- arrayOfAlpha16
- arrayOfCMYK
- arrayOfConfig
- arrayOfGray
- arrayOfGray16
- arrayOfImage
- arrayOfNRGBA
- arrayOfNRGBA64
- arrayOfNYCbCrA
- arrayOfPaletted
- arrayOfPalettedImage
- arrayOfPoint
- arrayOfRGBA
- arrayOfRGBA64
- arrayOfRGBA64Image
- arrayOfRectangle
- arrayOfUniform
- arrayOfYCbCr
- arrayOfYCbCrSubsampleRatio
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
Black
Var v1.0Black is an opaque black uniform image.
-
ErrFormat
Var v1.0ErrFormat indicates that decoding encountered an unknown format.
-
Opaque
Var v1.0Opaque is a fully opaque uniform image.
-
Transparent
Var v1.0Transparent is a fully transparent uniform image.
-
White
Var v1.0White is an opaque white uniform image.
-
YCbCrSubsampleRatio410
GoObject v1.0 -
YCbCrSubsampleRatio411
GoObject v1.0 -
YCbCrSubsampleRatio420
GoObject v1.0 -
YCbCrSubsampleRatio422
GoObject v1.0 -
YCbCrSubsampleRatio440
GoObject v1.0 -
YCbCrSubsampleRatio444
GoObject v1.0 -
ZP
Var v1.0ZP is the zero Point.
Deprecated: Use a literal image.Point{} instead.
-
ZR
Var v1.0ZR is the zero Rectangle.
Deprecated: Use a literal image.Rectangle{} instead.
Functions, Macros, and Special Forms
-
Decode
Function v1.0(Decode r)
Decode decodes an image that has been encoded in a registered format.
The string returned is the format name used during format registration.
Format registration is typically done by an init function in the codec-
specific package.
Go input arguments: (r io.Reader)
Go returns: (Image, string, error)
Joker input arguments: [^go.std.io/Reader r]
Joker returns: [^Image, ^String, ^Error] -
DecodeConfig
Function v1.0(DecodeConfig r)
DecodeConfig decodes the color model and dimensions of an image that has
been encoded in a registered format. The string returned is the format name
used during format registration. Format registration is typically done by
an init function in the codec-specific package.
Go input arguments: (r io.Reader)
Go returns: (Config, string, error)
Joker input arguments: [^go.std.io/Reader r]
Joker returns: [^Config, ^String, ^Error] -
NewAlpha
Function v1.0(NewAlpha r)
NewAlpha returns a new Alpha image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *Alpha
Joker input arguments: [^Rectangle r]
Joker returns: ^*Alpha -
NewAlpha16
Function v1.0(NewAlpha16 r)
NewAlpha16 returns a new Alpha16 image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *Alpha16
Joker input arguments: [^Rectangle r]
Joker returns: ^*Alpha16 -
NewCMYK
Function v1.0(NewCMYK r)
NewCMYK returns a new CMYK image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *CMYK
Joker input arguments: [^Rectangle r]
Joker returns: ^*CMYK -
NewGray
Function v1.0(NewGray r)
NewGray returns a new Gray image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *Gray
Joker input arguments: [^Rectangle r]
Joker returns: ^*Gray -
NewGray16
Function v1.0(NewGray16 r)
NewGray16 returns a new Gray16 image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *Gray16
Joker input arguments: [^Rectangle r]
Joker returns: ^*Gray16 -
NewNRGBA
Function v1.0(NewNRGBA r)
NewNRGBA returns a new NRGBA image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *NRGBA
Joker input arguments: [^Rectangle r]
Joker returns: ^*NRGBA -
NewNRGBA64
Function v1.0(NewNRGBA64 r)
NewNRGBA64 returns a new NRGBA64 image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *NRGBA64
Joker input arguments: [^Rectangle r]
Joker returns: ^*NRGBA64 -
NewNYCbCrA
Function v1.0(NewNYCbCrA r subsampleRatio)
NewNYCbCrA returns a new NYCbCrA image with the given bounds and subsample
ratio.
Go input arguments: (r Rectangle, subsampleRatio YCbCrSubsampleRatio)
Go returns: *NYCbCrA
Joker input arguments: [^Rectangle r, ^YCbCrSubsampleRatio subsampleRatio]
Joker returns: ^*NYCbCrA -
NewPaletted
Function v1.0(NewPaletted r p)
NewPaletted returns a new Paletted image with the given width, height and
palette.
Go input arguments: (r Rectangle, p image/color.Palette)
Go returns: *Paletted
Joker input arguments: [^Rectangle r, ^go.std.image.color/Palette p]
Joker returns: ^*Paletted -
NewRGBA
Function v1.0(NewRGBA r)
NewRGBA returns a new RGBA image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *RGBA
Joker input arguments: [^Rectangle r]
Joker returns: ^*RGBA -
NewRGBA64
Function v1.0(NewRGBA64 r)
NewRGBA64 returns a new RGBA64 image with the given bounds.
Go input arguments: (r Rectangle)
Go returns: *RGBA64
Joker input arguments: [^Rectangle r]
Joker returns: ^*RGBA64 -
NewUniform
Function v1.0(NewUniform c)
NewUniform returns a new Uniform image of the given color.
Go input arguments: (c image/color.Color)
Go returns: *Uniform
Joker input arguments: [^go.std.image.color/Color c]
Joker returns: ^*Uniform -
NewYCbCr
Function v1.0(NewYCbCr r subsampleRatio)
NewYCbCr returns a new YCbCr image with the given bounds and subsample
ratio.
Go input arguments: (r Rectangle, subsampleRatio YCbCrSubsampleRatio)
Go returns: *YCbCr
Joker input arguments: [^Rectangle r, ^YCbCrSubsampleRatio subsampleRatio]
Joker returns: ^*YCbCr -
Pt
Function v1.0(Pt X Y)
Pt is shorthand for Point{X, Y}.
Go input arguments: (X int, Y int)
Go returns: Point
Joker input arguments: [^Int X, ^Int Y]
Joker returns: ^Point -
Rect
Function v1.0(Rect x0 y0 x1 y1)
Rect is shorthand for Rectangle{Pt(x0, y0), Pt(x1, y1)}. The returned
rectangle has minimum and maximum coordinates swapped if necessary so that
it is well-formed.
Go input arguments: (x0 int, y0 int, x1 int, y1 int)
Go returns: Rectangle
Joker input arguments: [^Int x0, ^Int y0, ^Int x1, ^Int y1]
Joker returns: ^Rectangle
Types
-
*Alpha
Concrete Type v1.0Alpha is an in-memory image whose At method returns color.Alpha values.
-
AlphaAt
Receiver for *Alpha v1.0([x y])
-
At
Receiver for *Alpha v1.0([x y])
-
Bounds
Receiver for *Alpha v1.0([])
-
ColorModel
Receiver for *Alpha v1.0([])
-
Opaque
Receiver for *Alpha v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *Alpha v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *Alpha v1.0([x y])
-
Set
Receiver for *Alpha v1.0([x y c])
-
SetAlpha
Receiver for *Alpha v1.0([x y c])
-
SetRGBA64
Receiver for *Alpha v1.0([x y c])
-
SubImage
Receiver for *Alpha v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*Alpha16
Concrete Type v1.0Alpha16 is an in-memory image whose At method returns color.Alpha16 values.
-
Alpha16At
Receiver for *Alpha16 v1.0([x y])
-
At
Receiver for *Alpha16 v1.0([x y])
-
Bounds
Receiver for *Alpha16 v1.0([])
-
ColorModel
Receiver for *Alpha16 v1.0([])
-
Opaque
Receiver for *Alpha16 v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *Alpha16 v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *Alpha16 v1.0([x y])
-
Set
Receiver for *Alpha16 v1.0([x y c])
-
SetAlpha16
Receiver for *Alpha16 v1.0([x y c])
-
SetRGBA64
Receiver for *Alpha16 v1.0([x y c])
-
SubImage
Receiver for *Alpha16 v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*CMYK
Concrete Type v1.0CMYK is an in-memory image whose At method returns color.CMYK values.
-
At
Receiver for *CMYK v1.0([x y])
-
Bounds
Receiver for *CMYK v1.0([])
-
CMYKAt
Receiver for *CMYK v1.0([x y])
-
ColorModel
Receiver for *CMYK v1.0([])
-
Opaque
Receiver for *CMYK v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *CMYK v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *CMYK v1.0([x y])
-
Set
Receiver for *CMYK v1.0([x y c])
-
SetCMYK
Receiver for *CMYK v1.0([x y c])
-
SetRGBA64
Receiver for *CMYK v1.0([x y c])
-
SubImage
Receiver for *CMYK v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*Config
Concrete Type v1.0Config holds an image's color model and dimensions.
-
*Gray
Concrete Type v1.0Gray is an in-memory image whose At method returns color.Gray values.
-
At
Receiver for *Gray v1.0([x y])
-
Bounds
Receiver for *Gray v1.0([])
-
ColorModel
Receiver for *Gray v1.0([])
-
GrayAt
Receiver for *Gray v1.0([x y])
-
Opaque
Receiver for *Gray v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *Gray v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *Gray v1.0([x y])
-
Set
Receiver for *Gray v1.0([x y c])
-
SetGray
Receiver for *Gray v1.0([x y c])
-
SetRGBA64
Receiver for *Gray v1.0([x y c])
-
SubImage
Receiver for *Gray v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*Gray16
Concrete Type v1.0Gray16 is an in-memory image whose At method returns color.Gray16 values.
-
At
Receiver for *Gray16 v1.0([x y])
-
Bounds
Receiver for *Gray16 v1.0([])
-
ColorModel
Receiver for *Gray16 v1.0([])
-
Gray16At
Receiver for *Gray16 v1.0([x y])
-
Opaque
Receiver for *Gray16 v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *Gray16 v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *Gray16 v1.0([x y])
-
Set
Receiver for *Gray16 v1.0([x y c])
-
SetGray16
Receiver for *Gray16 v1.0([x y c])
-
SetRGBA64
Receiver for *Gray16 v1.0([x y c])
-
SubImage
Receiver for *Gray16 v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*NRGBA
Concrete Type v1.0NRGBA is an in-memory image whose At method returns color.NRGBA values.
-
At
Receiver for *NRGBA v1.0([x y])
-
Bounds
Receiver for *NRGBA v1.0([])
-
ColorModel
Receiver for *NRGBA v1.0([])
-
NRGBAAt
Receiver for *NRGBA v1.0([x y])
-
Opaque
Receiver for *NRGBA v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *NRGBA v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *NRGBA v1.0([x y])
-
Set
Receiver for *NRGBA v1.0([x y c])
-
SetNRGBA
Receiver for *NRGBA v1.0([x y c])
-
SetRGBA64
Receiver for *NRGBA v1.0([x y c])
-
SubImage
Receiver for *NRGBA v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*NRGBA64
Concrete Type v1.0NRGBA64 is an in-memory image whose At method returns color.NRGBA64 values.
-
At
Receiver for *NRGBA64 v1.0([x y])
-
Bounds
Receiver for *NRGBA64 v1.0([])
-
ColorModel
Receiver for *NRGBA64 v1.0([])
-
NRGBA64At
Receiver for *NRGBA64 v1.0([x y])
-
Opaque
Receiver for *NRGBA64 v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *NRGBA64 v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *NRGBA64 v1.0([x y])
-
Set
Receiver for *NRGBA64 v1.0([x y c])
-
SetNRGBA64
Receiver for *NRGBA64 v1.0([x y c])
-
SetRGBA64
Receiver for *NRGBA64 v1.0([x y c])
-
SubImage
Receiver for *NRGBA64 v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*NYCbCrA
Concrete Type v1.0NYCbCrA is an in-memory image of non-alpha-premultiplied Y'CbCr-with-alpha
colors. A and AStride are analogous to the Y and YStride fields of the
embedded YCbCr.
-
AOffset
Receiver for *NYCbCrA v1.0([x y])
AOffset returns the index of the first element of A that corresponds to the
pixel at (x, y).
-
At
Receiver for *NYCbCrA v1.0([x y])
-
Bounds
Receiver for *NYCbCrA v1.0([])
-
COffset
Receiver for *NYCbCrA v1.0([x y])
COffset returns the index of the first element of Cb or Cr that corresponds
to the pixel at (x, y).
-
ColorModel
Receiver for *NYCbCrA v1.0([])
-
NYCbCrAAt
Receiver for *NYCbCrA v1.0([x y])
-
Opaque
Receiver for *NYCbCrA v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
RGBA64At
Receiver for *NYCbCrA v1.0([x y])
-
SubImage
Receiver for *NYCbCrA v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
YCbCrAt
Receiver for *NYCbCrA v1.0([x y])
-
YOffset
Receiver for *NYCbCrA v1.0([x y])
YOffset returns the index of the first element of Y that corresponds to
the pixel at (x, y).
-
*Paletted
Concrete Type v1.0Paletted is an in-memory image of uint8 indices into a given palette.
-
At
Receiver for *Paletted v1.0([x y])
-
Bounds
Receiver for *Paletted v1.0([])
-
ColorIndexAt
Receiver for *Paletted v1.0([x y])
-
ColorModel
Receiver for *Paletted v1.0([])
-
Opaque
Receiver for *Paletted v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *Paletted v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *Paletted v1.0([x y])
-
Set
Receiver for *Paletted v1.0([x y c])
-
SetColorIndex
Receiver for *Paletted v1.0([x y index])
-
SetRGBA64
Receiver for *Paletted v1.0([x y c])
-
SubImage
Receiver for *Paletted v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*Point
Concrete Type v1.0A Point is an X, Y coordinate pair. The axes increase right and down.
-
*RGBA
Concrete Type v1.0RGBA is an in-memory image whose At method returns color.RGBA values.
-
At
Receiver for *RGBA v1.0([x y])
-
Bounds
Receiver for *RGBA v1.0([])
-
ColorModel
Receiver for *RGBA v1.0([])
-
Opaque
Receiver for *RGBA v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *RGBA v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *RGBA v1.0([x y])
-
RGBAAt
Receiver for *RGBA v1.0([x y])
-
Set
Receiver for *RGBA v1.0([x y c])
-
SetRGBA
Receiver for *RGBA v1.0([x y c])
-
SetRGBA64
Receiver for *RGBA v1.0([x y c])
-
SubImage
Receiver for *RGBA v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*RGBA64
Concrete Type v1.0RGBA64 is an in-memory image whose At method returns color.RGBA64 values.
-
At
Receiver for *RGBA64 v1.0([x y])
-
Bounds
Receiver for *RGBA64 v1.0([])
-
ColorModel
Receiver for *RGBA64 v1.0([])
-
Opaque
Receiver for *RGBA64 v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
PixOffset
Receiver for *RGBA64 v1.0([x y])
PixOffset returns the index of the first element of Pix that corresponds to
the pixel at (x, y).
-
RGBA64At
Receiver for *RGBA64 v1.0([x y])
-
Set
Receiver for *RGBA64 v1.0([x y c])
-
SetRGBA64
Receiver for *RGBA64 v1.0([x y c])
-
SubImage
Receiver for *RGBA64 v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
*Rectangle
Concrete Type v1.0A Rectangle contains the points with Min.X <= X < Max.X, Min.Y <= Y < Max.Y.
It is well-formed if Min.X <= Max.X and likewise for Y. Points are always
well-formed. A rectangle's methods always return well-formed outputs for
well-formed inputs.
A Rectangle is also an Image whose bounds are the rectangle itself. At
returns color.Opaque for points in the rectangle and color.Transparent
otherwise.
-
*Uniform
Concrete Type v1.0Uniform is an infinite-sized Image of uniform color.
It implements the color.Color, color.Model, and Image interfaces.
-
At
Receiver for *Uniform v1.0([x y])
-
Bounds
Receiver for *Uniform v1.0([])
-
ColorModel
Receiver for *Uniform v1.0([])
-
Convert
Receiver for *Uniform v1.0([arg1])
-
Opaque
Receiver for *Uniform v1.0([])
Opaque scans the entire image and reports whether it is fully opaque.
-
RGBA
Receiver for *Uniform v1.0([])
-
RGBA64At
Receiver for *Uniform v1.0([x y])
-
*YCbCr
Concrete Type v1.0YCbCr is an in-memory image of Y'CbCr colors. There is one Y sample per
pixel, but each Cb and Cr sample can span one or more pixels.
YStride is the Y slice index delta between vertically adjacent pixels.
CStride is the Cb and Cr slice index delta between vertically adjacent pixels
that map to separate chroma samples.
It is not an absolute requirement, but YStride and len(Y) are typically
multiples of 8, and:
For 4:4:4, CStride == YStride/1 && len(Cb) == len(Cr) == len(Y)/1.
For 4:2:2, CStride == YStride/2 && len(Cb) == len(Cr) == len(Y)/2.
For 4:2:0, CStride == YStride/2 && len(Cb) == len(Cr) == len(Y)/4.
For 4:4:0, CStride == YStride/1 && len(Cb) == len(Cr) == len(Y)/2.
For 4:1:1, CStride == YStride/4 && len(Cb) == len(Cr) == len(Y)/4.
For 4:1:0, CStride == YStride/4 && len(Cb) == len(Cr) == len(Y)/8.
-
At
Receiver for *YCbCr v1.0([x y])
-
Bounds
Receiver for *YCbCr v1.0([])
-
COffset
Receiver for *YCbCr v1.0([x y])
COffset returns the index of the first element of Cb or Cr that corresponds
to the pixel at (x, y).
-
ColorModel
Receiver for *YCbCr v1.0([])
-
Opaque
Receiver for *YCbCr v1.0([])
-
RGBA64At
Receiver for *YCbCr v1.0([x y])
-
SubImage
Receiver for *YCbCr v1.0([r])
SubImage returns an image representing the portion of the image p visible
through r. The returned value shares pixels with the original image.
-
YCbCrAt
Receiver for *YCbCr v1.0([x y])
-
YOffset
Receiver for *YCbCr v1.0([x y])
YOffset returns the index of the first element of Y that corresponds to
the pixel at (x, y).
-
*YCbCrSubsampleRatio
Concrete Type v1.0YCbCrSubsampleRatio is the chroma subsample ratio used in a YCbCr image.
-
Alpha
Concrete Type v1.0Alpha is an in-memory image whose At method returns color.Alpha values.
-
Alpha16
Concrete Type v1.0Alpha16 is an in-memory image whose At method returns color.Alpha16 values.
-
CMYK
Concrete Type v1.0CMYK is an in-memory image whose At method returns color.CMYK values.
-
Config
Concrete Type v1.0Config holds an image's color model and dimensions.
-
Gray
Concrete Type v1.0Gray is an in-memory image whose At method returns color.Gray values.
-
Gray16
Concrete Type v1.0Gray16 is an in-memory image whose At method returns color.Gray16 values.
-
Image
Abstract Type v1.0Image is a finite rectangular grid of color.Color values taken from a color
model.
-
At
Method for Image v1.0([x y])
-
Bounds
Method for Image v1.0([])
-
ColorModel
Method for Image v1.0([])
-
NRGBA
Concrete Type v1.0NRGBA is an in-memory image whose At method returns color.NRGBA values.
-
NRGBA64
Concrete Type v1.0NRGBA64 is an in-memory image whose At method returns color.NRGBA64 values.
-
NYCbCrA
Concrete Type v1.0NYCbCrA is an in-memory image of non-alpha-premultiplied Y'CbCr-with-alpha
colors. A and AStride are analogous to the Y and YStride fields of the
embedded YCbCr.
-
Paletted
Concrete Type v1.0Paletted is an in-memory image of uint8 indices into a given palette.
-
PalettedImage
Abstract Type v1.0PalettedImage is an image whose colors may come from a limited palette.
If m is a PalettedImage and m.ColorModel() returns a color.Palette p,
then m.At(x, y) should be equivalent to p[m.ColorIndexAt(x, y)]. If m's
color model is not a color.Palette, then ColorIndexAt's behavior is
undefined.
-
At
Method for PalettedImage v1.0([x y])
-
Bounds
Method for PalettedImage v1.0([])
-
ColorIndexAt
Method for PalettedImage v1.0([x y])
-
ColorModel
Method for PalettedImage v1.0([])
-
Point
Concrete Type v1.0A Point is an X, Y coordinate pair. The axes increase right and down.
-
Add
Receiver for Point v1.0([q])
Add returns the vector p+q.
-
Div
Receiver for Point v1.0([k])
Div returns the vector p/k.
-
Eq
Receiver for Point v1.0([q])
Eq reports whether p and q are equal.
-
In
Receiver for Point v1.0([r])
In reports whether p is in r.
-
Mod
Receiver for Point v1.0([r])
Mod returns the point q in r such that p.X-q.X is a multiple of r's width
and p.Y-q.Y is a multiple of r's height.
-
Mul
Receiver for Point v1.0([k])
Mul returns the vector p*k.
-
String
Receiver for Point v1.0([])
String returns a string representation of p like "(3,4)".
-
Sub
Receiver for Point v1.0([q])
Sub returns the vector p-q.
-
RGBA
Concrete Type v1.0RGBA is an in-memory image whose At method returns color.RGBA values.
-
RGBA64
Concrete Type v1.0RGBA64 is an in-memory image whose At method returns color.RGBA64 values.
-
RGBA64Image
Abstract Type v1.0RGBA64Image is an Image whose pixels can be converted directly to a
color.RGBA64.
-
At
Method for RGBA64Image v1.0([x y])
-
Bounds
Method for RGBA64Image v1.0([])
-
ColorModel
Method for RGBA64Image v1.0([])
-
RGBA64At
Method for RGBA64Image v1.0([x y])
-
Rectangle
Concrete Type v1.0A Rectangle contains the points with Min.X <= X < Max.X, Min.Y <= Y < Max.Y.
It is well-formed if Min.X <= Max.X and likewise for Y. Points are always
well-formed. A rectangle's methods always return well-formed outputs for
well-formed inputs.
A Rectangle is also an Image whose bounds are the rectangle itself. At
returns color.Opaque for points in the rectangle and color.Transparent
otherwise.
-
Add
Receiver for Rectangle v1.0([p])
Add returns the rectangle r translated by p.
-
At
Receiver for Rectangle v1.0([x y])
At implements the Image interface.
-
Bounds
Receiver for Rectangle v1.0([])
Bounds implements the Image interface.
-
Canon
Receiver for Rectangle v1.0([])
Canon returns the canonical version of r. The returned rectangle has minimum
and maximum coordinates swapped if necessary so that it is well-formed.
-
ColorModel
Receiver for Rectangle v1.0([])
ColorModel implements the Image interface.
-
Dx
Receiver for Rectangle v1.0([])
Dx returns r's width.
-
Dy
Receiver for Rectangle v1.0([])
Dy returns r's height.
-
Empty
Receiver for Rectangle v1.0([])
Empty reports whether the rectangle contains no points.
-
Eq
Receiver for Rectangle v1.0([s])
Eq reports whether r and s contain the same set of points. All empty
rectangles are considered equal.
-
In
Receiver for Rectangle v1.0([s])
In reports whether every point in r is in s.
-
Inset
Receiver for Rectangle v1.0([n])
Inset returns the rectangle r inset by n, which may be negative. If either
of r's dimensions is less than 2*n then an empty rectangle near the center
of r will be returned.
-
Intersect
Receiver for Rectangle v1.0([s])
Intersect returns the largest rectangle contained by both r and s. If the
two rectangles do not overlap then the zero rectangle will be returned.
-
Overlaps
Receiver for Rectangle v1.0([s])
Overlaps reports whether r and s have a non-empty intersection.
-
RGBA64At
Receiver for Rectangle v1.0([x y])
RGBA64At implements the RGBA64Image interface.
-
Size
Receiver for Rectangle v1.0([])
Size returns r's width and height.
-
String
Receiver for Rectangle v1.0([])
String returns a string representation of r like "(3,4)-(6,5)".
-
Sub
Receiver for Rectangle v1.0([p])
Sub returns the rectangle r translated by -p.
-
Union
Receiver for Rectangle v1.0([s])
Union returns the smallest rectangle that contains both r and s.
-
Uniform
Concrete Type v1.0Uniform is an infinite-sized Image of uniform color.
It implements the color.Color, color.Model, and Image interfaces.
-
YCbCr
Concrete Type v1.0YCbCr is an in-memory image of Y'CbCr colors. There is one Y sample per
pixel, but each Cb and Cr sample can span one or more pixels.
YStride is the Y slice index delta between vertically adjacent pixels.
CStride is the Cb and Cr slice index delta between vertically adjacent pixels
that map to separate chroma samples.
It is not an absolute requirement, but YStride and len(Y) are typically
multiples of 8, and:
For 4:4:4, CStride == YStride/1 && len(Cb) == len(Cr) == len(Y)/1.
For 4:2:2, CStride == YStride/2 && len(Cb) == len(Cr) == len(Y)/2.
For 4:2:0, CStride == YStride/2 && len(Cb) == len(Cr) == len(Y)/4.
For 4:4:0, CStride == YStride/1 && len(Cb) == len(Cr) == len(Y)/2.
For 4:1:1, CStride == YStride/4 && len(Cb) == len(Cr) == len(Y)/4.
For 4:1:0, CStride == YStride/4 && len(Cb) == len(Cr) == len(Y)/8.
-
YCbCrSubsampleRatio
Concrete Type v1.0YCbCrSubsampleRatio is the chroma subsample ratio used in a YCbCr image.
-
String
Receiver for YCbCrSubsampleRatio v1.0([])
-
arrayOfAlpha
Concrete Type v1.0Alpha is an in-memory image whose At method returns color.Alpha values.
-
arrayOfAlpha16
Concrete Type v1.0Alpha16 is an in-memory image whose At method returns color.Alpha16 values.
-
arrayOfCMYK
Concrete Type v1.0CMYK is an in-memory image whose At method returns color.CMYK values.
-
arrayOfConfig
Concrete Type v1.0Config holds an image's color model and dimensions.
-
arrayOfGray
Concrete Type v1.0Gray is an in-memory image whose At method returns color.Gray values.
-
arrayOfGray16
Concrete Type v1.0Gray16 is an in-memory image whose At method returns color.Gray16 values.
-
arrayOfImage
Concrete Type v1.0Image is a finite rectangular grid of color.Color values taken from a color
model.
-
arrayOfNRGBA
Concrete Type v1.0NRGBA is an in-memory image whose At method returns color.NRGBA values.
-
arrayOfNRGBA64
Concrete Type v1.0NRGBA64 is an in-memory image whose At method returns color.NRGBA64 values.
-
arrayOfNYCbCrA
Concrete Type v1.0NYCbCrA is an in-memory image of non-alpha-premultiplied Y'CbCr-with-alpha
colors. A and AStride are analogous to the Y and YStride fields of the
embedded YCbCr.
-
arrayOfPaletted
Concrete Type v1.0Paletted is an in-memory image of uint8 indices into a given palette.
-
arrayOfPalettedImage
Concrete Type v1.0PalettedImage is an image whose colors may come from a limited palette.
If m is a PalettedImage and m.ColorModel() returns a color.Palette p,
then m.At(x, y) should be equivalent to p[m.ColorIndexAt(x, y)]. If m's
color model is not a color.Palette, then ColorIndexAt's behavior is
undefined.
-
arrayOfPoint
Concrete Type v1.0A Point is an X, Y coordinate pair. The axes increase right and down.
-
arrayOfRGBA
Concrete Type v1.0RGBA is an in-memory image whose At method returns color.RGBA values.
-
arrayOfRGBA64
Concrete Type v1.0RGBA64 is an in-memory image whose At method returns color.RGBA64 values.
-
arrayOfRGBA64Image
Concrete Type v1.0RGBA64Image is an Image whose pixels can be converted directly to a
color.RGBA64.
-
arrayOfRectangle
Concrete Type v1.0A Rectangle contains the points with Min.X <= X < Max.X, Min.Y <= Y < Max.Y.
It is well-formed if Min.X <= Max.X and likewise for Y. Points are always
well-formed. A rectangle's methods always return well-formed outputs for
well-formed inputs.
A Rectangle is also an Image whose bounds are the rectangle itself. At
returns color.Opaque for points in the rectangle and color.Transparent
otherwise.
-
arrayOfUniform
Concrete Type v1.0Uniform is an infinite-sized Image of uniform color.
It implements the color.Color, color.Model, and Image interfaces.
-
arrayOfYCbCr
Concrete Type v1.0YCbCr is an in-memory image of Y'CbCr colors. There is one Y sample per
pixel, but each Cb and Cr sample can span one or more pixels.
YStride is the Y slice index delta between vertically adjacent pixels.
CStride is the Cb and Cr slice index delta between vertically adjacent pixels
that map to separate chroma samples.
It is not an absolute requirement, but YStride and len(Y) are typically
multiples of 8, and:
For 4:4:4, CStride == YStride/1 && len(Cb) == len(Cr) == len(Y)/1.
For 4:2:2, CStride == YStride/2 && len(Cb) == len(Cr) == len(Y)/2.
For 4:2:0, CStride == YStride/2 && len(Cb) == len(Cr) == len(Y)/4.
For 4:4:0, CStride == YStride/1 && len(Cb) == len(Cr) == len(Y)/2.
For 4:1:1, CStride == YStride/4 && len(Cb) == len(Cr) == len(Y)/4.
For 4:1:0, CStride == YStride/4 && len(Cb) == len(Cr) == len(Y)/8.
-
arrayOfYCbCrSubsampleRatio
Concrete Type v1.0YCbCrSubsampleRatio is the chroma subsample ratio used in a YCbCr image.