imgutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatPng

func CreatPng(width, height int) *image.RGBA

创建一个指定宽高的图片

func FlipImgMirror

func FlipImgMirror(in, out string) error

img 文件 镜像翻转

func FlipImgVertical

func FlipImgVertical(in, out string) error

img 文件 上下垂直翻转

func FlipMirror

func FlipMirror(m image.Image) *image.RGBA

img 图像, 左右镜像翻转

func FlipVertical

func FlipVertical(m image.Image) *image.RGBA

img 图像, 上下垂直翻转

func LoadImage

func LoadImage(path string) (img image.Image, err error)

读取一张图片

func MixImg

func MixImg(src *image.RGBA, dist image.Image, x, y int)

混合两个图片

func Resize

func Resize(m image.Image, w, h int) *image.RGBA

https://studygolang.com/articles/1156 Resample返回图像切片r (m)的重新采样副本。 返回的图像宽度为w,高度为h。 func Resample(m image.Image, r image.Rectangle, w, h int) *image.RGBA {

func Rotation180

func Rotation180(m image.Image) *image.RGBA

img 图像, 180°旋转

func RotationImg180

func RotationImg180(in, out string) error

img 文件, 180°旋转

func RotationImgLeft

func RotationImgLeft(in, out string) error

img 文件, 逆时针旋转90°

func RotationImgRight

func RotationImgRight(in, out string) error

img 文件, 顺时针旋转90°

func RotationLeft

func RotationLeft(m image.Image) *image.RGBA

img 图像, 逆时针旋转90°

func RotationRight

func RotationRight(m image.Image) *image.RGBA

img 图像, 顺时针旋转90°

func SaveImage

func SaveImage(p string, src image.Image) error

保存一张图片

func TrimBlankDir

func TrimBlankDir(dir, suffix string) error

将一个文件夹内的内容都进行Trim

func TrimBlankFile

func TrimBlankFile(in, out string) error

将一个图片文件Trim空白边

func TrimBlankImg

func TrimBlankImg(src image.Image) (image.Image, error)

将一个图片对象Trim空白边

func Trimming

func Trimming(in, out string, x, y, w, h int) error

图片裁剪

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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