bimgKit

package
v3.0.63 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(src, dest string) error

Convert 转换图片的格式.

!!!: (1) 因为 h2non/bimg 基于C语言的libvip库,因此使用要满足"一些条件",详见: https://mp.weixin.qq.com/s/kAFZohzJo2DiKkxjnVti6A (2) bug: 转换后,透明背景色 可能=> 黑色背景色(即使目标格式支持透明背景色); (3) bug: 图片转pdf.

@param dest 如果已经存在且是个文件,会覆盖

支持的格式:

"jpg"
"jpeg"
"png"
"webp"
"tiff"
"gif"
"pdf"
"svg"
"magick"
"heif"
"avif"

func GetImageType

func GetImageType(path string) (bimg.ImageType, error)

GetImageType 根据 文件名 判断图片类型.

Types

This section is empty.

Jump to

Keyboard shortcuts

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