Documentation
¶
Index ¶
- func GoldenCompare(t *testing.T, buf []byte, filename string)
- func Process(buf []byte, options *Options) ([]byte, error)
- type AffineTransform
- type CropStrategy
- type Flip
- type GaussianBlur
- type Gravity
- type HistogramOperation
- type ImageFormat
- type Interpolator
- type Kernel
- type Options
- type RGBA
- type ResizeStrategy
- type Sharpen
- type ValueOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoldenCompare ¶
GoldenCompare checks the given buffer against the raw filename data. If the file doesn't exist, then the buffer is written out to the file.
Types ¶
type AffineTransform ¶
type CropStrategy ¶
type CropStrategy int
const ( CropStrategyEntropy CropStrategy = iota CropStrategyAttention )
type GaussianBlur ¶
type HistogramOperation ¶
type HistogramOperation int
const ( HistogramOperationNone HistogramOperation = iota HistogramOperationCumulative HistogramOperationNormalize )
type ImageFormat ¶
type ImageFormat int
const ( ImageFormatUnknown ImageFormat = iota ImageFormatBmp ImageFormatJpeg ImageFormatPng ImageFormatWebp )
type Interpolator ¶
type Interpolator int
const ( InterpolatorDefault Interpolator = iota InterpolatorBicubic InterpolatorBilinear InterpolatorLBB InterpolatorNearestNeighbor InterpolatorNohalo InterpolatorVSQBS )
type Options ¶
type Options struct {
BackgroundColor *RGBA
CenterSampling bool
CropOffsetX *ValueOption
CropOffsetY *ValueOption
Flip Flip
Gamma float64
GaussianBlur *GaussianBlur
Gravity Gravity
Height *ValueOption
HistogramOperation HistogramOperation
Interpolator Interpolator
Kernel Kernel
OutputFormat ImageFormat
PostFlip int
PostRotate int
Quality int
ResizeStrategy ResizeStrategy
Rotate int
Sharpen *Sharpen
Transform *AffineTransform
Width *ValueOption
}
Options specifies how to process the input image
type ResizeStrategy ¶
type ResizeStrategy int
const ( ResizeStrategyDefault ResizeStrategy = iota ResizeStrategyCrop ResizeStrategyMax ResizeStrategyMin ResizeStrategyPad ResizeStrategyStretch )
type ValueOption ¶
type ValueOption struct {
// contains filtered or unexported fields
}
func NewValueOptionDouble ¶
func NewValueOptionDouble(v float64) *ValueOption
func NewValueOptionInt ¶
func NewValueOptionInt(v int) *ValueOption
func (*ValueOption) Double ¶
func (t *ValueOption) Double() float64
func (*ValueOption) Int ¶
func (t *ValueOption) Int() int
func (*ValueOption) IsDouble ¶
func (t *ValueOption) IsDouble() bool
func (*ValueOption) IsInt ¶
func (t *ValueOption) IsInt() bool
Click to show internal directories.
Click to hide internal directories.