colorspace

package module
Version: v0.0.0-...-0de846b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2022 License: Unlicense Imports: 4 Imported by: 0

Documentation

Overview

Package colorspace implements color space conversion wrappers compatible with image.Image.

It is a proof of concept for https://github.com/golang/go/issues/11420.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SRGBA

type SRGBA struct {
	image.RGBA64Image
}

SRGBA wraps an Image encoded in the sRGB color space.

func NewSRGBA

func NewSRGBA(img image.Image) *SRGBA

NewSRGBA returns an SRGBA that wraps img. It panics if ima doesn't implement image.RGBA64Image.

func (*SRGBA) At

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

At converts an sRGB color from the underlying image to linear RGB.

func (*SRGBA) RGBA64At

func (p *SRGBA) RGBA64At(x, y int) color.RGBA64

RGBA64At converts an sRGB color from the underlying image to linear RGB.

func (*SRGBA) Set

func (p *SRGBA) Set(x, y int, c color.Color)

Set converts a linear RGB color to sRGB and stores it in the underlying image.

func (*SRGBA) SetRGBA64

func (p *SRGBA) SetRGBA64(x, y int, c color.RGBA64)

SetRGBA64 converts a linear RGB color to sRGB and stores it in the underlying image.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL