channel

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 4 Imported by: 4

Documentation

Overview

Package channel provides image channel separation and manipulation functions.

Index

Constants

View Source
const (
	Red = iota
	Green
	Blue
	Alpha
)

Channel identifiers

Variables

This section is empty.

Functions

func Extract

func Extract(img image.Image, c Channel) *image.Gray

Extract returns a grayscale image containing the values of the selected channel.

Usage example:

result := channel.Extract(img, channel.Alpha)

func ExtractMultiple added in v0.11.0

func ExtractMultiple(img image.Image, channels ...Channel) *image.RGBA

ExtractMultiple returns a RGBA image containing the values of the selected channels.

Usage example:

result := channel.ExtractMultiple(img, channel.Blue, channel.Alpha)

Types

type Channel

type Channel int

Channel identifier for RGBA images

Jump to

Keyboard shortcuts

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