Skip to content

proposal: image: add image.NYCbCrA and color.NYCbCrA types. #12722

@nigeltao

Description

@nigeltao

This adds transparency (an Alpha channel) to the existing YCbCr types for JPEG-like images and color. The N stands for non-alpha-premultiplied, the same as the existing NRGBA types.

JPEG-like-with-alpha is used by the WebP format, and there already exists code (see [0]) under golang.org/x to represent such images and colors. The proposal is to move that from golang.org/x/image/webp/nycbcra to image, so that the image/draw package in the standard library can recognize such images, and implement a fast path for drawing them, the way YCbCr images are fast-pathed.

[0] https://go.googlesource.com/image/+/master/webp/nycbcra/nycbcra.go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions