lightbox

package
v0.0.0-...-acfe09f Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(f Format, out io.Writer, img image.Image, quality int) error

Encode writes img in the desired image format f to the out stream. If the selected format is a lossy format, quality between 1-100 represents the strength of compression with 1 being the highest compressions / lowest quality and 100 being the lowest compression / highest quality. If the format supports lossless compression (e.g. WebP) in addition to lossy compression, quality values > 100 represent lossless compression. Note, SVG cannot be encoded

func FormatParse

func FormatParse(n string) (Format, error)

FormatParse converts the string representation of format into the enum

func FormatParseFromAccept

func FormatParseFromAccept(a string) (Format, error)

FormatParseFromAccept returns a format based on the supplied Accept header

func FormatParseFromFilename

func FormatParseFromFilename(n string) (Format, error)

FormatParseFromFilename returns a format based on the supplied file extension

func FormatParseFromMIME

func FormatParseFromMIME(mt string) (Format, error)

FormatParseFromMIME returns a format based on the supplied MIME string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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