imageconverter

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConvertMode

type ConvertMode string
const (
	ModeThreshold ConvertMode = "threshold"
	ModeDither    ConvertMode = "dither"
)

type Converter

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

func NewConverter

func NewConverter(opener Opener) *Converter

func (*Converter) Convert

func (c *Converter) Convert(path string, maxWidthDots int, mode ConvertMode) (*Result, error)

type FileOpener

type FileOpener struct{}

func (*FileOpener) Open

func (o *FileOpener) Open(path string) (io.ReadCloser, error)

type Opener

type Opener interface {
	Open(path string) (io.ReadCloser, error)
}

type Result

type Result struct {
	Data       []byte
	WidthBytes int
	HeightDots int
}

Jump to

Keyboard shortcuts

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