fitzimg

package
v1.23.7-v20240401 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(src []byte, dst io.Writer, params *Params) error

func IsErrorFormatIssue

func IsErrorFormatIssue(err error) bool

func NumPage

func NumPage(src []byte) (int, error)

Types

type Archive

type Archive int
const (
	Raw Archive = iota
	Tar
	Zip
)

Archive types

type ArchiveWriter

type ArchiveWriter interface {
	StartEntry(name string) (io.Writer, error)
	FinishEntry() error
	Write(f *os.File, name string) (int64, error)
	Close() error
}

type Params

type Params struct {
	Width, Height       int
	FirstPage, LastPage int
	Archive             Archive
	Format              imaging.Format
	Quality             int
	Resize              Resize
	Resample            imaging.ResampleFilter
}

type Resize

type Resize int
const (
	Fit Resize = iota
	FitBlack
	FitWhite
	FitUpscale
	FitUpscaleBlack
	FitUpscaleWhite
	Fill
	FillTopLeft
	FillTop
	FillTopRight
	FillLeft
	FillRight
	FillBottomLeft
	FillBottom
	FillBottomRight
	Stretch
)

Resize

Jump to

Keyboard shortcuts

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