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.
Click to show internal directories.
Click to hide internal directories.