vipsKit

package
v2.8.164 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(path string, params *vips.ImportParams) (*vips.ImageRef, error)

Read

@param params 可以为nil

func SetUp

func SetUp(config *vips.Config)

SetUp

!!!: (1) macOS需要设置环境变量(否则govips may not compile): export CGO_CFLAGS_ALLOW="-Xpreprocessor" (2) 必要条件: CGO_ENABLED=1 (3) 涉及到C,交叉编译只能搞 当前所在环境 的.

PS: (1) vips 8.14.5支持的格式: webp、heif、pdf、png、tiff、svg、jp2k、gif、jpeg、magick.

@param config 可以为nil(使用默认配置: concurrency=1 cache_max_files=0 cache_max_mem=52428800 cache_max=100)

func ToAvif

func ToAvif(src, dest string, exportParams *vips.AvifExportParams) error

func ToGif

func ToGif(src, dest string, exportParams *vips.GifExportParams) error

func ToHeif

func ToHeif(src, dest string, exportParams *vips.HeifExportParams) error

ToHeif

PS: (0) 必需先set up; (1) iphone使用 heif格式 存储照片(占用内存比JPEG格式少); (2) 常见的HEIF封装类型文件有 .heic 和 .avif。

func ToJpeg

func ToJpeg(src, dest string, exportParams *vips.JpegExportParams) error

func ToPng

func ToPng(src, dest string, exportParams *vips.PngExportParams) error

func ToTiff

func ToTiff(src, dest string, exportParams *vips.TiffExportParams) error

func ToWebp

func ToWebp(src, dest string, exportParams *vips.WebpExportParams) error

func ToWebpData added in v2.8.106

func ToWebpData(src string, exportParams *vips.WebpExportParams) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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