Documentation
¶
Index ¶
- func Blur(img image.Image) *blur
- func InvertColors(img image.Image) *invertColors
- func MirrorHorizontal(img image.Image) *mirrorHorizontal
- func MirrorVertical(img image.Image) *mirrorVertical
- func Rotate(img image.Image, degrees float64, center *image.Point, keepBounds bool) *rotate
- func Rotate180(img image.Image) *rotate180
- func Rotate90(img image.Image) *rotate90
- func SubImage(img draw.Image, r image.Rectangle) draw.Image
- func Translate(img image.Image, by image.Point) *translate
- func WrapEdges(img image.Image) *wrapEdges
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MirrorHorizontal ¶
MirrorHorizontal flips an image along its X-axis.
func MirrorVertical ¶
MirrorVertical flips an image along its Y-axis.
func Rotate ¶
Rotate rotates img by degrees amount about center. Positive degrees result in a counter-clockwise rotation. keepBounds specifies if the original bounds of img should be kept (true) or if new bounds should be calculated based on the rotated image (false). If center is nil, the center of img is used. If you repeatedly rotate an image.Image with keepBounds false, the image bounds will continue to grow. For example, doing Rotate(Rotate(img, 45, nil, false), -45, nil false) will get you an image that appears in the same orientation as img, but will have bounds nearly 3x the original.
func Rotate90 ¶
Rotate90 efficiently (compared to Rotate) rotates an image 90 degrees counter-clockwise. Not currently working and I CBA.
func SubImage ¶
SubImage tries to use the SubImage method of img, if it has one otherwise, return same image wrapped so that r becomes the new bounds.
Types ¶
type Number ¶
type Number interface { constraints.Integer | constraints.Float }