Help us shape the future of Go! Take the 2026 Go Developer Survey

capture

package
v0.6.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package capture provides generic image conversion and processing helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeJPEG

func EncodeJPEG(img image.Image, quality int) ([]byte, error)

EncodeJPEG encodes img as JPEG with quality.

func EncodePNG

func EncodePNG(img image.Image) ([]byte, error)

EncodePNG encodes img as PNG.

func GenerateDiff

func GenerateDiff(old, new image.Image) image.Image

GenerateDiff creates a diff image highlighting changes between two images.

func GoImageFromCGImage

func GoImageFromCGImage(cgImage coregraphics.CGImageRef, cropTopPx int) (image.Image, error)

GoImageFromCGImage converts a CGImageRef to a Go image.Image.

func ScaleImage

func ScaleImage(img image.Image, scale float64) image.Image

ScaleImage resizes an image by scale using bilinear interpolation.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL