Documentation ¶
Overview ¶
Package clone provides image cloning function.
Index ¶
Constants ¶
View Source
const ( // NoFill leaves the padded pixels empty. NoFill = iota // EdgeExtend extends the closest edge pixel. EdgeExtend // EdgeWrap wraps around the pixels of an image. EdgeWrap )
Variables ¶
This section is empty.
Functions ¶
func AsShallowRGBA ¶
AsShallowRGBA tries to cast to image.RGBA to get reference. Otherwise makes a copy
func Pad ¶
Pad returns an RGBA copy of the src image parameter with its edges padded using the supplied PadMethod. Parameter padX and padY correspond to the amount of padding to be applied on each side. Parameter m is the PadMethod to fill the new pixels.
Usage example:
result := Pad(img, 5,5, EdgeExtend)
Types ¶
Click to show internal directories.
Click to hide internal directories.