imageserver.v0: gopkg.in/pierrre/imageserver.v0/image/nfntresize Index | Files

package nfntresize

import "gopkg.in/pierrre/imageserver.v0/image/nfntresize"

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

Index

Package Files

nfntresize.go

type Processor Uses

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 Uses

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

Change implements imageserver/image.Processor.

func (*Processor) Process Uses

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

Process implements imageserver/image.Processor.

Package nfntresize imports 4 packages (graph). Updated 2018-09-19. Refresh now. Tools for package owners.