image

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: NCSA Imports: 22 Imported by: 2

README

Image Build Status

ASM

To build the ASM you need the following packages:

go get github.com/klauspost/asmfmt/cmd/asmfmt
go get github.com/minio/c2goasm
go get github.com/minio/asm2plan9s

you will also need the yasm package

Notes:

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(r io.Reader, opts ...Option) (types.Image, error)

func Resize

func Resize(inputImage types.Image, opts ...Option) (types.Image, error)

Types

type Layout

type Layout int
const (
	HWCLayout Layout = iota
	CHWLayout
	InvalidLayout Layout = 9999
)

func LayoutString

func LayoutString(s string) (Layout, error)

LayoutString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func LayoutValues

func LayoutValues() []Layout

LayoutValues returns all values of the enum

func (Layout) IsALayout

func (i Layout) IsALayout() bool

IsALayout returns "true" if the value is listed in the enum definition. "false" otherwise

func (Layout) MarshalJSON

func (i Layout) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Layout

func (Layout) MarshalText

func (i Layout) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for Layout

func (Layout) MarshalYAML

func (i Layout) MarshalYAML() (interface{}, error)

MarshalYAML implements a YAML Marshaler for Layout

func (*Layout) Scan

func (i *Layout) Scan(value interface{}) error

func (Layout) String

func (i Layout) String() string

func (*Layout) UnmarshalJSON

func (i *Layout) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Layout

func (*Layout) UnmarshalText

func (i *Layout) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for Layout

func (*Layout) UnmarshalYAML

func (i *Layout) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements a YAML Unmarshaler for Layout

func (Layout) Value

func (i Layout) Value() (driver.Value, error)

type Option

type Option func(o *Options)

func ChannelLayout

func ChannelLayout(layout Layout) Option

func Context

func Context(ctx context.Context) Option

func DCTMethod

func DCTMethod(method string) Option

func Height

func Height(height int) Option

func KeepAspectRatio

func KeepAspectRatio(keepAspectRatio bool) Option

func MaxDimension

func MaxDimension(dim int) Option

func Mean

func Mean(mean [3]float32) Option

func MeanValue

func MeanValue(mean float32) Option

func MinDimension added in v0.1.1

func MinDimension(dim int) Option

func Mode

func Mode(mode types.Mode) Option

func ResizeAlgorithm

func ResizeAlgorithm(alg types.ResizeAlgorithm) Option

func ResizeShape

func ResizeShape(shape []int) Option

func Resized

func Resized(height, width int) Option

func Width

func Width(width int) Option

type Options

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

func NewOptions

func NewOptions(opts ...Option) *Options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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