imgproc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Proc

func Proc(
	ident any,
	src ImageResizer,
	maxWidth,
	maxHeight int,
	callback func(*Sixel),
)

sends a image processing request to the workers

func ProcClear

func ProcClear()

clears the image map, serves for EventResize

func ProcDelete

func ProcDelete(key any)

Types

type CPUImageResizer

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

func (*CPUImageResizer) Release

func (cir *CPUImageResizer) Release() error

func (*CPUImageResizer) Resize

func (cir *CPUImageResizer) Resize(maxWidth, maxHeight uint) (image.Image, error)

func (*CPUImageResizer) ResizePaletted

func (cir *CPUImageResizer) ResizePaletted(p, maxWidth, maxHeight uint) (*image.Paletted, error)

type Cache

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

func (*Cache) Load

func (cc *Cache) Load(key any) (any, bool)

func (*Cache) Store

func (cc *Cache) Store(key, val any)

type Capturer

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

func NewCapturer

func NewCapturer() *Capturer

starts capturing stdout of a cgo call this needs to be called before every cgo call if you want the stdout output in go's log

func (*Capturer) Dump

func (c *Capturer) Dump()

after the cgo call, dump captured stdout bytes to log

type ImageResizer

type ImageResizer interface {
	Release() error
	Resize(maxWidth, maxHeight uint) (image.Image, error)
	ResizePaletted(p, maxWidth, maxHeight uint) (*image.Paletted, error)
}

func NewImageResizer

func NewImageResizer(i any) ImageResizer

type Sixel

type Sixel struct {
	Bounds image.Rectangle
	// contains filtered or unexported fields
}

Sixel are the bytes of a image encoded in sixel format it has the ability to draw just specified rows of the image

func EncodeSixel

func EncodeSixel(nc int, img *image.Paletted) *Sixel

func (*Sixel) Rows

func (s *Sixel) Rows() int

type SixelScreen

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

SixelScreen collects sixel data and it's positions then to be printed to the screen

func (*SixelScreen) Add

func (ss *SixelScreen) Add(s *Sixel, x, y, from, to int)

func (*SixelScreen) Reset

func (ss *SixelScreen) Reset()

func (*SixelScreen) Write

func (ss *SixelScreen) Write(w io.Writer)

Jump to

Keyboard shortcuts

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