resizing

package
v0.0.0-...-067dddc Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resizer

type Resizer struct {
	// contains filtered or unexported fields
}

Resizer is a utility for resizing images fetched from URLs. It uses the `resize` package to perform the resizing.

func NewResizer

func NewResizer() *Resizer

NewResizer creates a new instance of Resizer with default HTTP client settings.

func (*Resizer) GetResizedImage

func (r *Resizer) GetResizedImage(ctx context.Context, url string, width, height uint, header http.Header) (image.Image, string, error)

GetResizedImage fetches an image from URL and resizes it to the specified dimensions. It returns the resized image as well as the MIME type of the original image.

Jump to

Keyboard shortcuts

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