imageresize

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDimensionNote

func FormatDimensionNote(result ResizedImage) string

func ImageEXIFOrientation

func ImageEXIFOrientation(bytes []byte) int

Types

type ConvertedImage

type ConvertedImage struct {
	Data     string
	MIMEType string
}

func ConvertToPNG

func ConvertToPNG(base64Data, mimeType string) *ConvertedImage

type ImageResizeOptions

type ImageResizeOptions struct {
	MaxWidth    int
	MaxHeight   int
	MaxBytes    int
	JPEGQuality int
}

type ResizedImage

type ResizedImage struct {
	Data           string
	MIMEType       string
	OriginalWidth  int
	OriginalHeight int
	Width          int
	Height         int
	WasResized     bool
}

func ResizeImage

func ResizeImage(part llm.ContentPart, options ...ImageResizeOptions) *ResizedImage

Jump to

Keyboard shortcuts

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