image

package
v0.0.0-...-b22b293 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Data []byte // The image data buffer
	Size int64  // The image size, in bytes.
	Type Kind   // The image MIME type.
}

Image represents a processed image, and contains the image data as a byte slice along with other useful information about the image.

func New

func New(data []byte) (*Image, error)

New creates a new image representation for the data buffer provided. It returns an error if the data buffer is empty or does not correspond to any known image type handled by Ico.

type Kind

type Kind int

Kind represents the MIME type for an image file.

const (
	JPEG Kind = iota
	PNG
	GIF
)

func (*Kind) String

func (k *Kind) String() string

String returns the internal representation of the image Kind as a MIME type.

Jump to

Keyboard shortcuts

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