Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ImageFormatUndefined is a reserved ImageFormat for cases when it's undefined. // So if anybody will have an ImageFormat with zero-value (not defined, yet) it won't receive // a mis-leading value like ImageFormatJPEG. ImageFormatUndefined = ImageFormat(iota) // ImageFormatJPEG is an ImageFormat for JPEGs ImageFormatJPEG // ImageFormatOther is an ImageFormat for all image formats not listed here in this enumeration ImageFormatOther )
Variables ¶
View Source
var (
ErrInvalidSize = errors.New(`invalid size`)
)
Functions ¶
This section is empty.
Types ¶
type ImageFormat ¶
type ImageFormat uint
ImageFormat is an enumeration data-type for image formats
func ParseImageFormat ¶
func ParseImageFormat(formatString string) ImageFormat
ParseImageFormat parses a string with an image format to ImageFormat.
Expected values: "JPEG"
func (ImageFormat) String ¶
func (ifmt ImageFormat) String() string
String just implements Stringer for nicer logging
type ImageProcessor ¶
type ImageProcessor interface { // Resize reads an image from `in` and writes a resized image to `out` // (new image size: `toWidth`x`toHeight`). // // It returns image format and (if occured:) an error. Resize(in io.Reader, out io.Writer, toWidth, toHeight uint) (ImageFormat, error) }
ImageProcessor is a tool to manipulate images
Click to show internal directories.
Click to hide internal directories.