resize

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package resize provides fast bilinear image scaling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fit

func Fit(src *image.NRGBA, maxW, maxH int) *image.NRGBA

Fit scales src to fit within maxW×maxH while preserving aspect ratio. The scale factor is min(maxW/srcW, maxH/srcH), so both dimensions are satisfied simultaneously. Returns src unchanged if it already fits within the bounds.

Types

This section is empty.

Jump to

Keyboard shortcuts

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