Documentation ¶
Overview ¶
Package resize implements various image resizing methods.
The package works with the Image interface described in the image package. Various interpolation methods are provided and multiple processors may be utilized in the computations.
Example:
imgResized := resize.Resize(1000, 0, imgOld, resize.MitchellNetravali)
Index ¶
- func Resize(width, height uint, img image.Image, interp InterpolationFunction) image.Image
- func Sinc(x float64) float64
- func Sinc1(x float64) (y float64)
- func Thumbnail(maxWidth, maxHeight uint, img image.Image, interp InterpolationFunction) image.Image
- type Filter
- func Bicubic(img image.Image, factor float32) Filter
- func Bilinear(img image.Image, factor float32) Filter
- func Lanczos2(img image.Image, factor float32) Filter
- func Lanczos3(img image.Image, factor float32) Filter
- func MitchellNetravali(img image.Image, factor float32) Filter
- func NearestNeighbor(img image.Image, factor float32) Filter
- type InterpolationFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resize ¶
Resize an image to new width and height using the interpolation function interp. A new image with the given dimensions will be returned. If one of the parameters width or height is set to 0, its size will be calculated so that the aspect ratio is that of the originating image. The resizing algorithm uses channels for parallel computation.
Types ¶
Click to show internal directories.
Click to hide internal directories.