Documentation ¶ Overview ¶ Package resize provides fast bilinear image scaling. Index ¶ func Fit(src *image.NRGBA, maxW, maxH int) *image.NRGBA 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. Source Files ¶ View all Source files resize.go Click to show internal directories. Click to hide internal directories.