imop

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

It is mainly used to debug the seam carving operation correctness with face detection and image mask enabled. When the GUI mode and the debugging option is activated it will show the image mask and the detected faces rectangles in a distinct color.

It is mainly used to debug the seam carving operation correctness with face detection and image mask enabled. When the GUI mode and the debugging option is activated it will show the image mask and the detected faces rectangles in a distinct color.

Index

Constants

View Source
const (
	Darken   = "darken"
	Lighten  = "lighten"
	Multiply = "multiply"
	Screen   = "screen"
	Overlay  = "overlay"
)
View Source
const (
	Copy    = "copy"
	SrcOver = "src_over"
	DstOver = "dst_over"
	SrcIn   = "src_in"
	DstIn   = "dst_in"
	SrcOut  = "src_out"
	DstOut  = "dst_out"
	SrcAtop = "src_atop"
	DstAtop = "dst_atop"
	Xor     = "xor"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitmap

type Bitmap struct {
	Img *image.NRGBA
}

Bitmap holds an image type as a placeholder for the Porter-Duff composition operations which can be used as a source or destination image.

func NewBitmap

func NewBitmap(rect image.Rectangle) *Bitmap

NewBitmap initializes a new Bitmap.

type Blend

type Blend struct {
	OpType string
}

Blend holds the currently active blend mode.

func NewBlend

func NewBlend() *Blend

NewBlend initializes a new Blend.

func (*Blend) Get

func (o *Blend) Get() string

Get returns the currently active blend mode.

func (*Blend) Set

func (o *Blend) Set(opType string)

Set activate one of the supported blend mode.

type Composite

type Composite struct {
	// contains filtered or unexported fields
}

Composite defines a struct with the active and all the supported composition operations.

func InitOp

func InitOp() *Composite

InitOp initializes a new composition operation.

func (*Composite) Draw

func (op *Composite) Draw(bitmap *Bitmap, src, dst *image.NRGBA, blend *Blend)

Draw applies the currently active Ported-Duff composition operation formula, taking as parameter the source and the destination image and draws the result into the bitmap. If a blend mode is activated it will plug in the alpha blending formula also into the equation.

func (*Composite) Set

func (op *Composite) Set(cop string)

Set changes the current composition operation.

Jump to

Keyboard shortcuts

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