image

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type int

Type represents an image format

const (
	PNG Type = iota
	JPEG
	GIF
	WEBP
	TIFF
	BMP

	Invalid Type = -1
)

func InferType

func InferType(fp string) (Type, error)

InferType attempts to guess a files image type based on its filepath and fails if not possible

func (Type) EncodeThumbnail

func (t Type) EncodeThumbnail(r io.Reader) ([]byte, error)

func (Type) MimeType

func (t Type) MimeType() string

MimeType returns the image mimetype, used for sending the image over the web

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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