image: golang.org/x/image/webp/nycbcra Index | Files

package nycbcra

import "golang.org/x/image/webp/nycbcra"

Package nycbcra provides non-alpha-premultiplied Y'CbCr-with-alpha image and color types.

Deprecated: as of Go 1.6. Use the standard image and image/color packages instead.

Index

Package Files

nycbcra.go

Variables

var ColorModel color.Model = color.ModelFunc(nYCbCrAModel)

ColorModel is the Model for non-alpha-premultiplied Y'CbCr-with-alpha colors.

type Color

type Color struct {
    color.YCbCr
    A   uint8
}

Color represents a non-alpha-premultiplied Y'CbCr-with-alpha color, having 8 bits each for one luma, two chroma and one alpha component.

func (Color) RGBA

func (c Color) RGBA() (r, g, b, a uint32)

type Image

type Image struct {
    image.YCbCr
    A       []uint8
    AStride int
}

Image 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.

func New

func New(r image.Rectangle, subsampleRatio image.YCbCrSubsampleRatio) *Image

New returns a new Image with the given bounds and subsample ratio.

func (*Image) AOffset

func (p *Image) AOffset(x, y int) int

AOffset returns the index of the first element of A that corresponds to the pixel at (x, y).

func (*Image) At

func (p *Image) At(x, y int) color.Color

func (*Image) ColorModel

func (p *Image) ColorModel() color.Model

func (*Image) NYCbCrAAt

func (p *Image) NYCbCrAAt(x, y int) Color

func (*Image) Opaque

func (p *Image) Opaque() bool

Opaque scans the entire image and reports whether it is fully opaque.

func (*Image) SubImage

func (p *Image) SubImage(r image.Rectangle) image.Image

SubImage returns an image representing the portion of the image p visible through r. The returned value shares pixels with the original image.

Package nycbcra imports 2 packages (graph) and is imported by 1 packages. Updated 6 days ago. Refresh now. Tools for package owners.