jpeg

package
v1.4.23 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder struct {
	Quality int
}

Encoder allows the encoding of JPEG's to a http.ResponseWriter.

func NewEncoder

func NewEncoder(r *http.Request) Encoder

NewEncoder creates a new Encoder based on the input request, this parses the `q` query variable to check to see if it needs to change the default quality format.

func (Encoder) Encode

func (e Encoder) Encode(i image.Image, w http.ResponseWriter) error

Encode writes the encoded image data out to the http.ResponseWriter.

Jump to

Keyboard shortcuts

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