imageutil

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package imageutil adds functions for working with images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectImage

func DetectImage(data []byte) string

DetectImage detects the image type of the data.

It's a copy of http.DetectContentType with some unnecessary parts removed, making it about 10 times faster.

It returns an empty string if the image type can't be determined.

func DetectImageStream

func DetectImageStream(fp io.ReadSeeker) (string, error)

DetectImageStream works like DetectImage, but operates on a file stream. It reads the minimal amount of data needed and Seek() back to where the offset was.

Types

This section is empty.

Jump to

Keyboard shortcuts

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