Categorygithub.com/phpisfirstofworld/image
modulepackage
0.0.3
Repository: https://github.com/phpisfirstofworld/image.git
Documentation: pkg.go.dev

# README

image

图片操作包

安装

go get github.com/phpisfirstofworld/image

设置图片尺寸

package main

import (
	"fmt"
	"github.com/phpisfirstofworld/image"
)

func main() {

	i := image.NewImage()

	res, err := i.LoadImage("img.png")

	if err != nil {

		fmt.Printf("err :%+v\n", err)

		return
	}
        
	//尺寸缩放50%
	fmt.Println(res.ResizePercent(50).Save("img_save.png"))
    
	//尺寸缩放50%并覆盖保存
	//fmt.Printf("err :%+v\n", res.ResizePercent(50).OverSave())

}

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author