image

package
v0.0.0-...-c5bcced Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

The image package enables loading and manipulating images.

var lib = require('image');
lib
	.load(context.req.body)
	.fit(400, 400)
	.grayscale()
	.pipe(context.res.body)
;

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(orb *orbit.Orbit) interface{}

Types

type Image

type Image struct {
	Val image.Image `console:"-"`
	// contains filtered or unexported fields
}

func NewImage

func NewImage(orb *orbit.Orbit, val image.Image) *Image

func (*Image) Blur

func (this *Image) Blur(radius float64) *Image

func (*Image) Brightness

func (this *Image) Brightness(percentage float64) *Image

func (*Image) Bytes

func (this *Image) Bytes(format ...int) []byte

func (*Image) Channel

func (this *Image) Channel(c int) *Image

func (*Image) Contrast

func (this *Image) Contrast(percentage float64) *Image

func (*Image) Crop

func (this *Image) Crop(x0, y0, x1, y1 int) *Image

func (*Image) Darken

func (this *Image) Darken(percentage float64) *Image

func (*Image) Dilate

func (this *Image) Dilate(radius float64) *Image

func (*Image) Edges

func (this *Image) Edges(radius float64) *Image

func (*Image) Emboss

func (this *Image) Emboss() *Image

func (*Image) Erode

func (this *Image) Erode(radius float64) *Image

func (*Image) Fill

func (this *Image) Fill(w, h int, anchor int, resampler ...imaging.ResampleFilter) *Image

func (*Image) Fit

func (this *Image) Fit(w, h int, resampler ...imaging.ResampleFilter) *Image

func (*Image) FlipH

func (this *Image) FlipH() *Image

func (*Image) FlipV

func (this *Image) FlipV() *Image

func (*Image) Gamma

func (this *Image) Gamma(gamma float64) *Image

func (*Image) Grayscale

func (this *Image) Grayscale() *Image

func (*Image) Height

func (this *Image) Height() int

func (*Image) Hue

func (this *Image) Hue(change int) *Image

func (*Image) Invert

func (this *Image) Invert() *Image

func (*Image) Len

func (this *Image) Len() int

func (*Image) Lighten

func (this *Image) Lighten(percentage float64) *Image

func (*Image) MarshalBinary

func (this *Image) MarshalBinary() ([]byte, error)

func (*Image) MarshalText

func (this *Image) MarshalText() ([]byte, error)

func (*Image) Median

func (this *Image) Median(radius float64) *Image

func (*Image) Pad

func (this *Image) Pad(x, y int) *Image

func (*Image) Pipe

func (this *Image) Pipe(w io.Writer, format ...int)

func (*Image) Read

func (this *Image) Read(b []byte) (int, error)

func (*Image) ReadAt

func (this *Image) ReadAt(b []byte, off int64) (int, error)

func (*Image) Resize

func (this *Image) Resize(w, h int, resampler ...imaging.ResampleFilter) *Image

func (*Image) Rotate

func (this *Image) Rotate(angle float64, x, y int) *Image

func (*Image) Rotate180

func (this *Image) Rotate180() *Image

func (*Image) Rotate270

func (this *Image) Rotate270() *Image

func (*Image) Rotate90

func (this *Image) Rotate90() *Image

func (*Image) Saturation

func (this *Image) Saturation(percentage float64) *Image

func (*Image) Seek

func (this *Image) Seek(offset int64, whence int) (int64, error)

func (*Image) Sepia

func (this *Image) Sepia() *Image

func (*Image) Sharpen

func (this *Image) Sharpen(radius float64) *Image

func (*Image) ShearH

func (this *Image) ShearH(angle float64) *Image

func (*Image) ShearV

func (this *Image) ShearV(angle float64) *Image

func (*Image) Sigmoid

func (this *Image) Sigmoid(midpoint, factor float64) *Image

func (*Image) Sobel

func (this *Image) Sobel() *Image

func (*Image) String

func (this *Image) String(format ...int) string

func (*Image) Threshold

func (this *Image) Threshold(level uint8) *Image

func (*Image) Thumbnail

func (this *Image) Thumbnail(w, h int, resampler ...imaging.ResampleFilter) *Image

func (*Image) Translate

func (this *Image) Translate(x, y int) *Image

func (*Image) Transpose

func (this *Image) Transpose() *Image

func (*Image) Transverse

func (this *Image) Transverse() *Image

func (*Image) Trim

func (this *Image) Trim(w, h int, anchor int) *Image

func (*Image) Unsharpen

func (this *Image) Unsharpen(radius, amount float64) *Image

func (*Image) Width

func (this *Image) Width() int

type Module

type Module struct {

	// Image channels
	R channel.Channel
	G channel.Channel
	B channel.Channel
	A channel.Channel
	// Image formats
	BMP  imaging.Format
	GIF  imaging.Format
	PNG  imaging.Format
	JPG  imaging.Format
	JPEG imaging.Format
	TIFF imaging.Format
	// Image anchors
	CENTER      imaging.Anchor
	TOP         imaging.Anchor
	LEFT        imaging.Anchor
	RIGHT       imaging.Anchor
	BOTTOM      imaging.Anchor
	TOPLEFT     imaging.Anchor
	TOPRIGHT    imaging.Anchor
	BOTTOMLEFT  imaging.Anchor
	BOTTOMRIGHT imaging.Anchor
	// Image resamplers
	NEAREST    imaging.ResampleFilter
	BOX        imaging.ResampleFilter
	LINEAR     imaging.ResampleFilter
	HERMITE    imaging.ResampleFilter
	MNETRAVALI imaging.ResampleFilter
	CATMULLROM imaging.ResampleFilter
	BSPLINE    imaging.ResampleFilter
	GAUSSIAN   imaging.ResampleFilter
	LANCZOS    imaging.ResampleFilter
	HANN       imaging.ResampleFilter
	HAMMING    imaging.ResampleFilter
	BLACKMAN   imaging.ResampleFilter
	BARTLETT   imaging.ResampleFilter
	WELCH      imaging.ResampleFilter
	COSINE     imaging.ResampleFilter
	// contains filtered or unexported fields
}

func (*Module) Load

func (this *Module) Load(r io.Reader) *Image

Directories

Path Synopsis
The image/change package shows the difference between two images.
The image/change package shows the difference between two images.
The image/codabar package generates codabar barcode images.
The image/codabar package generates codabar barcode images.
The image/code package generates qr code images.
The image/code package generates qr code images.
The image/code128 package generates code128 barcode images.
The image/code128 package generates code128 barcode images.
The image/code39 package generates code39 barcode images.
The image/code39 package generates code39 barcode images.
The image/datamatrix package generates datamatrix barcode images.
The image/datamatrix package generates datamatrix barcode images.
The image/diff package creates an image diff of two images.
The image/diff package creates an image diff of two images.
The image/ean package generates ean barcode images.
The image/ean package generates ean barcode images.
The image/patch package applies an image diff to another image.
The image/patch package applies an image diff to another image.
The image/placeholder package generates placeholder images with text.
The image/placeholder package generates placeholder images with text.
The image/qr package generates qr code images.
The image/qr package generates qr code images.
The image/twooffive package generates twooffive barcode images.
The image/twooffive package generates twooffive barcode images.

Jump to

Keyboard shortcuts

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