SkillAgentSearch skills...

Imagecompression

Simple image compression using SVD

Install / Use

/learn @nurlantulemisov/Imagecompression
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Go Coverage Status

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Roadmap

  1. Compression of grayscale images
  2. Provide Frobenius norm
<!-- CONTACT -->

Contact

Tulemisov Nurlan - @NurlanTulemisov

Email - nurlan.tulemisov@gmail.com

Project Link: https://github.com/nurlantulemisov/imagecompression

Related Skills

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated1y ago
Forks0

Languages

Go

Security Score

80/100

Audited on Feb 24, 2025

No findings