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 ¶
- func New(orb *orbit.Orbit) interface{}
- type Image
- func (this *Image) Blur(radius float64) *Image
- func (this *Image) Brightness(percentage float64) *Image
- func (this *Image) Bytes(format ...int) []byte
- func (this *Image) Channel(c int) *Image
- func (this *Image) Contrast(percentage float64) *Image
- func (this *Image) Crop(x0, y0, x1, y1 int) *Image
- func (this *Image) Darken(percentage float64) *Image
- func (this *Image) Dilate(radius float64) *Image
- func (this *Image) Edges(radius float64) *Image
- func (this *Image) Emboss() *Image
- func (this *Image) Erode(radius float64) *Image
- func (this *Image) Fill(w, h int, anchor int, resampler ...imaging.ResampleFilter) *Image
- func (this *Image) Fit(w, h int, resampler ...imaging.ResampleFilter) *Image
- func (this *Image) FlipH() *Image
- func (this *Image) FlipV() *Image
- func (this *Image) Gamma(gamma float64) *Image
- func (this *Image) Grayscale() *Image
- func (this *Image) Height() int
- func (this *Image) Hue(change int) *Image
- func (this *Image) Invert() *Image
- func (this *Image) Len() int
- func (this *Image) Lighten(percentage float64) *Image
- func (this *Image) MarshalBinary() ([]byte, error)
- func (this *Image) MarshalText() ([]byte, error)
- func (this *Image) Median(radius float64) *Image
- func (this *Image) Pad(x, y int) *Image
- func (this *Image) Pipe(w io.Writer, format ...int)
- func (this *Image) Read(b []byte) (int, error)
- func (this *Image) ReadAt(b []byte, off int64) (int, error)
- func (this *Image) Resize(w, h int, resampler ...imaging.ResampleFilter) *Image
- func (this *Image) Rotate(angle float64, x, y int) *Image
- func (this *Image) Rotate180() *Image
- func (this *Image) Rotate270() *Image
- func (this *Image) Rotate90() *Image
- func (this *Image) Saturation(percentage float64) *Image
- func (this *Image) Seek(offset int64, whence int) (int64, error)
- func (this *Image) Sepia() *Image
- func (this *Image) Sharpen(radius float64) *Image
- func (this *Image) ShearH(angle float64) *Image
- func (this *Image) ShearV(angle float64) *Image
- func (this *Image) Sigmoid(midpoint, factor float64) *Image
- func (this *Image) Sobel() *Image
- func (this *Image) String(format ...int) string
- func (this *Image) Threshold(level uint8) *Image
- func (this *Image) Thumbnail(w, h int, resampler ...imaging.ResampleFilter) *Image
- func (this *Image) Translate(x, y int) *Image
- func (this *Image) Transpose() *Image
- func (this *Image) Transverse() *Image
- func (this *Image) Trim(w, h int, anchor int) *Image
- func (this *Image) Unsharpen(radius, amount float64) *Image
- func (this *Image) Width() int
- type Module
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Image ¶
func (*Image) Brightness ¶
func (*Image) MarshalBinary ¶
func (*Image) MarshalText ¶
func (*Image) Resize ¶
func (this *Image) Resize(w, h int, resampler ...imaging.ResampleFilter) *Image
func (*Image) Saturation ¶
func (*Image) Thumbnail ¶
func (this *Image) Thumbnail(w, h int, resampler ...imaging.ResampleFilter) *Image
func (*Image) Transverse ¶
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 }
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. |
Click to show internal directories.
Click to hide internal directories.