imageformats

package
v0.0.0-...-a8c8bb6 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// HeifMediaType is the name of the registered HEIF parser.
	HeifMediaType = "heif"
)
View Source
const (
	// JpegMediaType is the name of the registered JPEG parser.
	JpegMediaType = "jpeg"
)
View Source
const (
	// PngMediaType is the name of the registered PNG parser.
	PngMediaType = "png"
)
View Source
const (
	// TiffMediaType is the name of the registered TIFF parser.
	TiffMediaType = "tiff"
)
View Source
const (
	// WebpMediaType is the name of the registered WEBP parser.
	WebpMediaType = "webp"
)

Variables

This section is empty.

Functions

func Formats

func Formats() (formats []riimage.MediaParser)

Formats returns all registered media-parsers.

func GetFormatForBytes

func GetFormatForBytes(data []byte) (name string, mp riimage.MediaParser)

GetFormatForBytes returns the first MP that can parse the given bytes. This has an obvious cost.

func GetFormatForExtension

func GetFormatForExtension(extension string) (name string, mp riimage.MediaParser)

GetFormatForExtension returns a MediaParser for the given extension or nil if none associated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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