Skip to content

edwvee/jpegquality

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read JPEG quality from bytes or os.File

Inpiration from Estimating Quality

usage:

	file, err := os.Open("file.jpg")
	if err != nil {
		log.Fatal(err)
	}
	j, err := jpegquality.New(file) // or NewWithBytes([]byte)
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("jpeg quality %d", j.Quality())

logging:

There is some output to your current log. So, you can change output target with SetDefaultLoggerOutput before running code from above. E.g., disable logging:

	jpegquality.SetDefaultLoggerOutput(ioutil.Discard)
	j, err := jpegquality.New(file) // or NewWithBytes([]byte)
	...

About

Read JPEG quality in golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%