Documentation ¶
Overview ¶
Package graph is a suite of utilities for performing various operation's on an Image
Index ¶
- func IsBlack(c color.Color) bool
- func IsNotBlack(c color.Color) bool
- func SetFont(gc *draw2dimg.GraphicContext, s string) error
- type Filter
- type Image
- func AutoCrop(src image.Image) Image
- func Crop(src image.Image, bounds image.Rectangle) Image
- func DrawMask(img, mask, dest image.Image) (Image, error)
- func DuplicateImage(img image.Image) Image
- func Expand(src image.Image, top, left, bottom, right int) Image
- func Immutable(img image.Image) Image
- func Mask(img, mask image.Image) (Image, error)
- func NewRGBA(img image.Image) Image
- func NewRGBAImage(bounds image.Rectangle) Image
- type Mapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotBlack ¶
Types ¶
type Filter ¶
Filter is a basic mapping function that is supplied with a Pixel and returns the new colour for that Pixel.
func (Filter) Do ¶
Do apply the filter against the source image, writing the result to the destination over the area defined by the supplied rectangle.
func (Filter) DoNew ¶
DoNew applies the filter against an image, returning a new mutable image with the result.
type Image ¶
Image is an image.Image with a Set method to change a single pixel.
func DrawMask ¶
DrawMask draws img over dest using mask to select which pixels in img are to be copied over. This returns a new image
func DuplicateImage ¶
DuplicateImage creates a new copy of an image which is also mutable