Versions in this module Expand all Collapse all v0 v0.6.16 Aug 24, 2026 Changes in this version + const DefaultMaxDimension + const DefaultMaxInputBytes + const DefaultMaxOutputBytes + const DefaultMaxPixels + type Error struct + Cause error + Code ErrorCode + Message string + func (e *Error) Error() string + func (e *Error) Unwrap() error + type ErrorCode string + const ErrorAnimated + const ErrorCancelled + const ErrorInvalid + const ErrorTooLarge + const ErrorTooManyPixels + const ErrorTypeMismatch + const ErrorUnsupported + func CodeOf(err error) ErrorCode + type Input struct + Data []byte + DeclaredMIME string + type Policy struct + MaxDimension int + MaxInputBytes int64 + MaxOutputBytes int64 + MaxPixels int64 + func DefaultPolicy() Policy + type Prepared struct + Bytes int + Content llm.ImageContent + OriginalHeight int + OriginalWidth int + OutputHeight int + OutputWidth int + Reencoded bool + Resized bool + func Prepare(ctx context.Context, input Input, policy Policy) (Prepared, error)