thumbnail

package
v0.0.0-...-6d4da9f Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package thumbnail provides a simple interface to thumbnail a JPEG stream and return the thumbnailed version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeThumbnail

func MakeThumbnail(src io.Reader, dst io.Writer, params ThumbnailParameters) error

MakeThumbnail makes a thumbnail of a JPEG stream at src and writes it to dst.

Types

type ThumbnailParameters

type ThumbnailParameters struct {
	Width          int     // Target width
	Height         int     // Target height
	Upscale        bool    // Whether to upscale images that are smaller than the target
	ForceAspect    bool    // Whether the source aspect ratio should be preserved
	Quality        int     // JPEG quality (0-99)
	Optimize       bool    // Whether to optimize the JPEG huffman tables
	PrescaleFactor float64 // Controls whether optimized JPEG prescaling is used and how much.
}

ThumbnailParameters configures the thumbnailing process

Jump to

Keyboard shortcuts

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