Documentation
¶
Index ¶
- Constants
- func Compress(inputPath, outputPath, format string, maxEdgeLength int) error
- func CompressForTelegram(input []byte) ([]byte, error)
- func CompressForTelegramFromFile(filePath string) (*osutil.TempFile, error)
- func FFmpegAvailable() bool
- func GetImagePhash(img image.Image) (string, error)
- func GetImagePhashFromReader(r io.Reader) (string, error)
- func GetImageThumbHash(img image.Image) (string, error)
- func GetSize(img image.Image) (int, int, error)
- func GetSizeFromReader(r io.Reader) (int, int, error)
- func UgoiraZipToMp4(zipPath string, frames []shared.UgoiraFrame, outputPath string) (string, error)
Constants ¶
View Source
const ( TelegramMaxPhotoFileSize int = 10 * 1024 * 1024 TelegramMaxPhotoTotalSideLength int = 10000 TelegramMaxPhotoSideLength int = 2560 )
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress compresses the image at inputPath and saves the result to outputPath.
The input image will be resized so that its longest edge does not exceed maxEdgeLength,
func CompressForTelegram ¶
func FFmpegAvailable ¶
func FFmpegAvailable() bool
func UgoiraZipToMp4 ¶
UgoiraZipToMp4 从 ugoira 的 zip 解压并转换为 mp4
返回生成的 mp4 路径(可能与 outputPath 不同,会自动添加 .mp4 后缀)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.