Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedFormat = errors.New("unsupported image format")
ErrUnsupportedFormat means the given image format is not supported.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format int
Format is an image file format.
ENUM( jpeg png gif tiff bmp )
func ParseFormat ¶
ParseFormat attempts to convert a string to a Format
func (Format) MarshalText ¶
MarshalText implements the text marshaller method
func (*Format) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method
type Option ¶
type Option func(*resizeConfig)
func WithFormat ¶
func WithMode ¶
func WithMode(mode ResizeMode) Option
func WithQuality ¶
type Quality ¶
type Quality int
ENUM( high medium low )
func ParseQuality ¶
ParseQuality attempts to convert a string to a Quality
func (Quality) MarshalText ¶
MarshalText implements the text marshaller method
func (*Quality) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method
type ResizeMode ¶
type ResizeMode int
ENUM( fit fill )
const ( // ResizeModeFit is a ResizeMode of type Fit ResizeModeFit ResizeMode = iota // ResizeModeFill is a ResizeMode of type Fill ResizeModeFill )
func ParseResizeMode ¶
func ParseResizeMode(name string) (ResizeMode, error)
ParseResizeMode attempts to convert a string to a ResizeMode
func (ResizeMode) MarshalText ¶
func (x ResizeMode) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method
func (*ResizeMode) Scan ¶
func (x *ResizeMode) Scan(value interface{}) error
Scan implements the Scanner interface.
func (ResizeMode) String ¶
func (x ResizeMode) String() string
String implements the Stringer interface.
func (*ResizeMode) UnmarshalText ¶
func (x *ResizeMode) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service