resize

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

README

resize

Overview

Description

Change dimensions of image

Implementation details

Uses the following libs:

  • "image" from standard golang (for the image.image type)
  • "github.com/disintegration/imaging" (for the resize function)

Compliance to Spec

Rough level of compliance

100%

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Config

type Config struct {
	Operation string                 `json:"operation"`
	Params    map[string]interface{} `json:"params,omitempty"`
	Input     map[string]interface{} `json:"input,omitempty"`
}

type Input

type Input struct {
	Img image.Image `md:"img"`
}

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

type Operation

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

func (*Operation) Eval

func (a *Operation) Eval(inputs map[string]interface{}) (interface{}, error)

type Params

type Params struct {
	Xsize int    `md:"xsize",required=false`
	Ysize int    `md:"ysize",required=false`
	Algo  string `md:"algo",allowed=["Lanczos","NearestNeighbor","Linear", "CatmullRom"],required=false`
}

Jump to

Keyboard shortcuts

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