gift

package
v0.0.0-...-77ed03d Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package gift provides imageserver/image.Processor implementations for GIFT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResizeProcessor

type ResizeProcessor struct {
	DefaultResampling gift.Resampling
	MaxWidth          int
	MaxHeight         int
}

ResizeProcessor is a imageserver/image.Processor implementation that resizes the Image with GIFT.

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

  • width
  • height
  • mode: resize mode possible values:
  • <no value> (default): see github.com/disintegration/gift.Resize
  • fit: see github.com/disintegration/gift.ResizeToFit
  • fill: see github.com/disintegration/gift.ResizeToFill
  • resampling: resampling method possible values:
  • nearest_neighbor (default)
  • box
  • linear
  • cubic
  • lanczos

func (*ResizeProcessor) Change

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

Change implements imageserver/image.Processor.

func (*ResizeProcessor) Process

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

Process implements imageserver/image.Processor.

type RotateProcessor

type RotateProcessor struct {
	DefaultInterpolation gift.Interpolation
}

RotateProcessor is a imageserver/image.Processor implementation that rotates the Image with GIFT.

func (*RotateProcessor) Change

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

Change implements imageserver/image.Processor.

func (*RotateProcessor) Process

func (prc *RotateProcessor) 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