copier

package
v0.0.0-...-2e4101f Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2017 License: Zlib Imports: 3 Imported by: 0

Documentation

Overview

An Image Copy algorithm. Supports both, single threaded and multithreaded operations.

Index

Constants

This section is empty.

Variables

View Source
var ESizeMismatch = errors.New("Size-Mismatch")

Functions

func Copy

func Copy(dst draw.Image, src image.Image, blind bool) error

Copies an Image using one thread.

func CopyMT

func CopyMT(dst draw.Image, src image.Image, blind bool, nthreads int) error

Copies an Image using multiple threads. The images should be thread-safe.

func Operate

func Operate(o Operator, r image.Rectangle)

Performs the Task 'o' on every Pixel within the Rectangle 'r'.

func OperateMT

func OperateMT(o Operator, r image.Rectangle, nthreads int)

Performs the Task 'o' on every Pixel within the Rectangle 'r'. This implementation uses multiple threads, so the Task should be threadsafe.

Types

type Operator

type Operator interface {
	Operate(pt image.Point)
}

Jump to

Keyboard shortcuts

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