Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
/ compress Public archive

Compress the image to the specified size using a dichotomy

License

Notifications You must be signed in to change notification settings

pzxy/compress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages