domain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImageFormatJPEG = iota + 1
	ImageFormatGIF
	ImageFormatPNG
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	Name        string
	Format      ImageFormat
	IsThumbnail bool
	Image       image.Image
}

func DecodeImage

func DecodeImage(src []byte, name string, isThumbnail bool) (*Image, error)

func (*Image) CreateThumbnail

func (i *Image) CreateThumbnail(rate float64) (*Image, error)

func (*Image) Encode

func (i *Image) Encode() ([]byte, error)

type ImageFormat

type ImageFormat uint8

func (ImageFormat) String

func (f ImageFormat) String() string

func (*ImageFormat) UnmarshalText

func (f *ImageFormat) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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