tiff

package
v0.0.0-...-3a06bfb Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigSchema = schema.StructFunc(func(prototype *Config) *schema.StructBuilder[Config] {
	return schema.Struct(prototype,
		schema.F("predictor", &prototype.Predictor, schema.Bool().Default(false)),
		schema.F("compression", (*string)(&prototype.Compression), schema.String().Default("deflate")),
	).DebugName("Config")
})
View Source
var ParamsSchema = schema.StructFunc(func(prototype *Params) *schema.StructBuilder[Params] {
	return schema.Struct(prototype,
		schema.F("pred", &prototype.Predictor, schema.Ptr(schema.Bool()).Default(nil)),
		schema.F("c", (*string)(&prototype.Compression), schema.String().Default("")),
	).DebugName("Params")
})

Functions

func Register

func Register(r *transform.Registry)

Types

type Applier

type Applier struct{ Config }

func (*Applier) Apply

func (ap *Applier) Apply(app core.App, a asset.Asset) (asset.Update, error)

type CompressionType

type CompressionType string

func (CompressionType) Get

type Config

type Config struct {
	Predictor bool `imbed:"predictor,false"`

	Compression CompressionType `imbed:"compression!string,\"deflate\""`
}

func (*Config) EncodeMsg

func (x *Config) EncodeMsg(w *fastbuf.W)

func (*Config) Get

func (c *Config) Get() (*tiff.Options, error)

func (*Config) Validate

func (c *Config) Validate() error

type Params

type Params struct {
	Predictor   *bool           `imbed:"pred,nil"`
	Compression CompressionType `imbed:"c!string,\"\""`
}

func (*Params) BuildTransform

func (p *Params) BuildTransform(config *Config) (transform.Applier, error)

func (*Params) EncodeMsg

func (x *Params) EncodeMsg(w *fastbuf.W)

func (*Params) Validate

func (p *Params) Validate() error

Jump to

Keyboard shortcuts

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