imageutil: github.com/pierrre/imageutil Index | Files

package imageutil

import "github.com/pierrre/imageutil"

Package imageutil provides utilities related to images.

Index

Package Files

at.go imageutil.go parallel.go rgba.go set.go

func NRGBAToRGBA Uses

func NRGBAToRGBA(r, g, b, a uint32) (uint32, uint32, uint32, uint32)

NRGBAToRGBA converts NRGBA to RGBA.

func Parallel1D Uses

func Parallel1D(r image.Rectangle, f func(image.Rectangle))

Parallel1D dispatches tasks concurrently for a Rectangle.

It splits the image horizontally in GOMAXPROCS parts and runs GOMAXPROCS workers.

It should be used if all the pixels of the image have the same process cost.

func Parallel2D Uses

func Parallel2D(r image.Rectangle, f func(image.Rectangle))

Parallel2D dispatches tasks concurrently for a Rectangle.

It splits the image in a GOMAXPROCS x GOMAXPROCS grid and runs GOMAXPROCS workers.

It should be used if all the pixels of the image don't have the same process cost.

func RGBAToNRGBA Uses

func RGBAToNRGBA(r, g, b, a uint32) (uint32, uint32, uint32, uint32)

RGBAToNRGBA converts RGBA to NRGBA.

type AtFunc Uses

type AtFunc func(x, y int) (r, g, b, a uint32)

AtFunc returns a RGBA value of the pixel at (x, y).

func NewAtFunc Uses

func NewAtFunc(p image.Image) AtFunc

NewAtFunc returns an AtFunc for an Image.

nolint: gocyclo

type SetFunc Uses

type SetFunc func(x, y int, r, g, b, a uint32)

SetFunc sets a RGBA value to the pixel at (x, y).

func NewSetFunc Uses

func NewSetFunc(p draw.Image) SetFunc

NewSetFunc returns a SetFunc for an Image.

nolint: gocyclo

Package imageutil imports 5 packages (graph) and is imported by 4 packages. Updated 2019-07-03. Refresh now. Tools for package owners.