swscale

package
v0.0.0-...-6d4da9f Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package swscale provides an interface to the libswscale library to scale YUV images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scale

func Scale(src *jpeg.YUVImage, opts ScaleOptions) (*jpeg.YUVImage, error)

Scale a YUVImage and return the new YUVImage

Types

type Filter

type Filter int

Filter identifies which scaling (interpolation) filter to use

const (
	FastBilinear Filter = C.SWS_FAST_BILINEAR
	Bilinear     Filter = C.SWS_BILINEAR
	Bicubic      Filter = C.SWS_BICUBIC
	X            Filter = C.SWS_X
	Point        Filter = C.SWS_POINT
	Area         Filter = C.SWS_AREA
	Bicublin     Filter = C.SWS_BICUBLIN
	Gauss        Filter = C.SWS_GAUSS
	Sinc         Filter = C.SWS_SINC
	Lanczos      Filter = C.SWS_LANCZOS
	Spline       Filter = C.SWS_SPLINE
)

Supported scaling filters

type ScaleOptions

type ScaleOptions struct {
	DstWidth, DstHeight int    // Target dimensions
	Filter              Filter // Filter type
}

ScaleOptions contains scaling parameters

Jump to

Keyboard shortcuts

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