gojpegoptim

package module
v0.0.0-...-7cc5f08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2014 License: MIT Imports: 6 Imported by: 0

README

gojpegoptim

An in memory jpegoptim chain toolkit for Go.

jpegoptim is a widely used tool to optimize jpeg size, but must implementation are using disk as buffer which is annoying on a resize farm.
Here is an alternative using all in memory structs.

go get github.com/akhenakh/gojpegoptim

Roadmap

  • RGB struct to jpegbuffer gojpegoptim.Encode()

Thanks

Frank Denis
Dailymotion

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(w io.Writer, m image.Image, o *Options) error

Encode writes the Image m to w in JPEG format with the given options.

func EncodeBytesOptimized

func EncodeBytesOptimized(srcBytes []byte, o *Options) (outBytes []byte, err error)

Optimize a JPEG bytes array if quality is -1, Optimize & Recompress if quality is between [0 - 100]

Types

type Options

type Options struct {
	Quality int
}

Options are the encoding parameters. Quality ranges from -1 to 100 inclusive, higher is better.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL