jpeg

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MIT Imports: 5 Imported by: 0

README

jpeg

import "github.com/wyattjoh/ims/internal/image/encoder/jpeg"

Overview

Index

Package files

jpeg.go

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.


Generated by godoc2md

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