Skip to content

dahaiyiyimcom/imgkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO IMAGE PROCCESS

What the purpose of this package?

The purpose of this package is to image resizing, compressing processes and adding to S3 Bucket.

How can use this package?

First of all install package and import

go get "github.com/dahaiyiyim/imgkit"
import imgkit "github.com/dahaiyiyim/imgkit"

Resizing and compressing image with using ImgCompress() method.

base64Str := "image_base64_string"
imageFile, _ := imgkit.ImgCompress(240, 240, base64Str)

Create config with using New() method.

config := imgkit.New(&imgkit.S3Config{
S3_ACCESS_KEY: "YOUR_ACCESS_KEY",
S3_SECRET_KEY: "YOUR_SECRET_KEY",
S3_REGION:     "YOUR_REGION",
S3_BUCKET:     "YOUR_BUCKET",
S3_OBJECT_KEY: "YOUR_OBJECT_KEY",
})

Add to S3 with using AddS3() method.

_ = config.AddS3(imageFile, "image.jpg")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages