internal

package
v2.0.0-...-2358e8e Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Drawer

type Drawer func(dst draw.Image, r image.Rectangle, src image.Image, sp image.Point, op draw.Op)
var Draw Drawer = draw.Draw

type ImageEncoder

type ImageEncoder func(w io.Writer, i image.Image) error
var EncodeImage ImageEncoder = png.Encode

type ImageMaker

type ImageMaker func(width, height int) *image.RGBA
var NewImage ImageMaker = func(width, height int) *image.RGBA {
	return image.NewRGBA(image.Rect(0, 0, width, height))
}

type ImageWriter

type ImageWriter func(file string, i image.Image) error
var WriteImage ImageWriter = func(file string, i image.Image) error {
	f, err := os.Create(file)
	if err != nil {
		return err
	}
	err = EncodeImage(f, i)
	if err != nil {
		return err
	}
	return f.Close()
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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