resize: Index | Files | Directories

package resize

import ""


Package Files


func Resample Uses

func Resample(m image.Image, r image.Rectangle, w, h int) image.Image

Resample returns a resampled copy of the image slice r of m. The returned image has width w and height h. plain old Nearest Neighbor algorithm

func Resize Uses

func Resize(m image.Image, sizeStr string) image.Image

Resize returns a scaled copy of the image slice r of m. The returned image has width w and height h.

type SizeSpec Uses

type SizeSpec struct {
    // contains filtered or unexported fields

func MakeSizeSpec Uses

func MakeSizeSpec(str string) *SizeSpec

func (SizeSpec) Height Uses

func (self SizeSpec) Height() int

func (SizeSpec) IsFull Uses

func (self SizeSpec) IsFull() bool

func (SizeSpec) IsLandscape Uses

func (self SizeSpec) IsLandscape() bool

func (SizeSpec) IsPortrait Uses

func (self SizeSpec) IsPortrait() bool

func (SizeSpec) IsSquare Uses

func (self SizeSpec) IsSquare() bool

func (SizeSpec) MaxDimension Uses

func (self SizeSpec) MaxDimension() int

func (SizeSpec) MinDimension Uses

func (self SizeSpec) MinDimension() int

func (SizeSpec) String Uses

func (self SizeSpec) String() string

func (*SizeSpec) TargetWH Uses

func (self *SizeSpec) TargetWH(rect image.Rectangle) (int, int)

size of the image that will result from resizing one of the specified rect to this SizeSpec

func (SizeSpec) ToImageMagickSpec Uses

func (self SizeSpec) ToImageMagickSpec() string

func (*SizeSpec) ToRect Uses

func (self *SizeSpec) ToRect(rect image.Rectangle) image.Rectangle

func (SizeSpec) Width Uses

func (self SizeSpec) Width() int



Package resize imports 5 packages (graph) and is imported by 1 packages. Updated 2017-07-24. Refresh now. Tools for package owners.