nfntresize

package
v0.0.0-...-b98e79d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package nfntresize provides a nfnt/resize imageserver/image.Processor implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

type Processor struct {
	DefaultInterpolation resize.InterpolationFunction
	MaxWidth             int
	MaxHeight            int
}

Processor is a nfnt/resize imageserver/image.Processor implementation.

All params are extracted from the "graphicsmagick" node param and are optionals:

  • width
  • height
  • mode: resize mode possible values:
  • resize (default): see github.com/nfnt/resize.Resize
  • thumbnail: see github.com/nfnt/resize.Thumbnail
  • interpolation: interpolation method possible values:
  • nearest_neighbor (default)
  • bilinear
  • bicubic
  • mitchell_netravali
  • lanczos2
  • lanczos3

func (*Processor) Change

func (prc *Processor) Change(params imageserver.Params) bool

Change implements imageserver/image.Processor.

func (*Processor) Process

func (prc *Processor) Process(nim image.Image, params imageserver.Params) (image.Image, error)

Process implements imageserver/image.Processor.

Jump to

Keyboard shortcuts

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