Documentation ¶
Index ¶
- Constants
- func ApplyKernel(kernel Kernel, img image.Image) image.Image
- func DownScale(img image.Image, newWidth, newHeight int, keepAspectRation bool) image.Image
- func ImageToRGBA(img image.Image) *image.RGBA
- func LoadImage(imagePath string) (image.Image, error)
- func SaveImage(img image.Image, imagePath string) error
- func UpScale(img image.Image, newWidth, newHeight int, keepAspectRation bool) image.Image
- type Kernel
Constants ¶
View Source
const ( PNG = ".png" JPG = ".jpg" JPEG = ".jpeg" )
Variables ¶
This section is empty.
Functions ¶
func ImageToRGBA ¶
Converts any image into a RGBA image
Types ¶
type Kernel ¶
type Kernel struct { // KernelValues holds the matrix values of the kernel. KernelValues [][]float64 // KernelFunction applies the kernel to a specific pixel in the image. KernelFunction func(x, y int, k Kernel, img *image.RGBA) color.RGBA }
Kernel represents a convolution kernel used in image processing.
Click to show internal directories.
Click to hide internal directories.