resize

package
v0.0.0-...-7c3cb44 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

https://pkg.go.dev/github.com/nfnt/resize

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resize

func Resize(width, height uint, img image.Image, interp r.InterpolationFunction) image.Image

Resize 使用插值函数 interp 将图像缩放到新的宽度和高度。将返回具有给定尺寸的新图像。 如果参数宽度或高度之一设置为 0,则将计算其大小,以便纵横比是原始图像的纵横比。 调整大小算法使用通道进行并行计算。如果输入图像的宽度或高度为 0,则原样返回。

func Thumbnail

func Thumbnail(maxWidth, maxHeight uint, img image.Image, interp r.InterpolationFunction) image.Image

Thumbnail 将提供的图像缩小到最大宽度和高度,保留原始纵横比并使用插值函数 interp。 如果原始尺寸已经小于提供的约束,它将返回原始图像,而不对其进行处理。

Types

This section is empty.

Jump to

Keyboard shortcuts

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