resize

package
v0.0.0-...-aeab57e Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 6 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
	Width  int
	Height int
}

Image stores image data encoded in its initial format

type ImageResize

type ImageResize struct{}

ImageResize implemets Resize interface for image resizing

func (*ImageResize) Resize

func (ir *ImageResize) Resize(img []byte, width int, height int) (*Result, error)

Resize resizes image due to parameters png, gif and jpeg are supported

type Resize

type Resize interface {
	Resize(image []byte, width int, height int) (*Result, error)
}

Resize represents the instance that is able to resize an image

type Result

type Result struct {
	Format   string
	Original Image
	Resized  Image
}

Result is return type of Resize operation

Directories

Path Synopsis
Package resize_mock is a generated GoMock package.
Package resize_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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