capture

package
v0.6.17 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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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