Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

compress

Compress the image to the specified size using a dichotomy

how to use?

go get github.com/pzxy/compress

examples

b, err := os.ReadFile("img.jpg")
if err != nil {
    t.Fatal(err)
}
b, err = compress.CompressImage(b, 0, 100, 200, 10)
if err != nil {
    t.Fatal(err)
}
_ = os.WriteFile("img2.jpg", b, 0644)

About

Compress the image to the specified size using a dichotomy

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages