Imagecompression
Simple image compression using SVD
Install / Use
/learn @nurlantulemisov/ImagecompressionREADME
SVD image compression
An implementation image compression using SVD decomposition on Go
Built With
Compression examples
Compress ratio | Image
-------|-----------------------------------
| Original |
| Ratio 10% |
|
| Ratio 50% |
| Ratio 80% |
|
| Ratio 90% |
|
| Ratio 99% |
|
Getting Started
To get a local copy up and running follow these simple steps.
Installation
Install vendor
go get -u github.com/nurlantulemisov/imagecompression
<!-- USAGE EXAMPLES -->
Simple usage
package main
import (
compression "github.com/nurlantulemisov/imagecompression"
"image/png"
"log"
"os"
)
func main() {
file, err := os.Open("examples/simple_usage/tmp/test.png")
if err != nil {
log.Fatalf(err.Error())
}
img, err := png.Decode(file)
if err != nil {
log.Fatalf(err.Error())
}
compressing, _ := compression.New(95)
compressingImage := compressing.Compress(img)
f, err := os.Create("examples/simple_usage/tmp/compressed-test.png")
if err != nil {
log.Fatalf("error creating file: %s", err)
}
defer func(f *os.File) {
err := f.Close()
if err != nil {
log.Fatalf(err.Error())
}
}(f)
err = png.Encode(f, compressingImage)
if err != nil {
log.Fatalf(err.Error())
}
}
<!-- CONTRIBUTING -->
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Roadmap
- Compression of grayscale images
- Provide Frobenius norm
Contact
Tulemisov Nurlan - @NurlanTulemisov
Email - nurlan.tulemisov@gmail.com
Project Link: https://github.com/nurlantulemisov/imagecompression
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
347.0kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
