Documentation
¶
Index ¶
- func DecodeURL(parts []string) (string, string, error)
- func ParsePresets(presetStrs []string) error
- func ValidatePresets() error
- type CropOptions
- type ExtendOptions
- type GravityOptions
- type GravityType
- type InvalidURLError
- type OptionArgumentError
- type PaddingOptions
- type ProcessingOptions
- type ResizeType
- type TrimOptions
- type UnknownOptionError
- type WatermarkOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePresets ¶
func ValidatePresets ¶
func ValidatePresets() error
Types ¶
type CropOptions ¶
type CropOptions struct { Width float64 Height float64 Gravity GravityOptions }
type ExtendOptions ¶
type ExtendOptions struct { Enabled bool Gravity GravityOptions }
type GravityOptions ¶
type GravityOptions struct { Type GravityType X, Y float64 }
func (*GravityOptions) RotateAndFlip ¶ added in v3.2.0
func (g *GravityOptions) RotateAndFlip(angle int, flip bool)
type GravityType ¶
type GravityType int
const ( GravityUnknown GravityType = iota GravityCenter GravityNorth GravityEast GravitySouth GravityWest GravityNorthWest GravityNorthEast GravitySouthWest GravitySouthEast GravitySmart GravityFocusPoint // Watermark gravity types GravityReplicate )
func (GravityType) MarshalJSON ¶
func (gt GravityType) MarshalJSON() ([]byte, error)
func (GravityType) String ¶
func (gt GravityType) String() string
type InvalidURLError ¶ added in v3.28.0
type InvalidURLError string
func (InvalidURLError) Error ¶ added in v3.28.0
func (e InvalidURLError) Error() string
type OptionArgumentError ¶ added in v3.28.0
type OptionArgumentError string
func (OptionArgumentError) Error ¶ added in v3.28.0
func (e OptionArgumentError) Error() string
type PaddingOptions ¶
type ProcessingOptions ¶
type ProcessingOptions struct { ResizingType ResizeType Width int Height int MinWidth int MinHeight int ZoomWidth float64 ZoomHeight float64 Dpr float64 Gravity GravityOptions Enlarge bool Extend ExtendOptions ExtendAspectRatio ExtendOptions Crop CropOptions Padding PaddingOptions Trim TrimOptions Rotate int Format imagetype.Type Quality int FormatQuality map[imagetype.Type]int MaxBytes int Flatten bool Background vips.Color Blur float32 Sharpen float32 Pixelate int StripMetadata bool KeepCopyright bool StripColorProfile bool AutoRotate bool EnforceThumbnail bool SkipProcessingFormats []imagetype.Type CacheBuster string Expires *time.Time Watermark WatermarkOptions PreferWebP bool EnforceWebP bool PreferAvif bool EnforceAvif bool PreferJxl bool EnforceJxl bool Filename string ReturnAttachment bool Raw bool UsedPresets []string SecurityOptions security.Options // contains filtered or unexported fields }
func NewProcessingOptions ¶
func NewProcessingOptions() *ProcessingOptions
func (*ProcessingOptions) Diff ¶
func (po *ProcessingOptions) Diff() structdiff.Entries
func (*ProcessingOptions) GetQuality ¶
func (po *ProcessingOptions) GetQuality() int
func (*ProcessingOptions) MarshalJSON ¶
func (po *ProcessingOptions) MarshalJSON() ([]byte, error)
func (*ProcessingOptions) String ¶
func (po *ProcessingOptions) String() string
type ResizeType ¶
type ResizeType int
const ( ResizeFit ResizeType = iota ResizeFill ResizeFillDown ResizeForce ResizeAuto )
func (ResizeType) MarshalJSON ¶
func (rt ResizeType) MarshalJSON() ([]byte, error)
func (ResizeType) String ¶
func (rt ResizeType) String() string
type TrimOptions ¶
type UnknownOptionError ¶ added in v3.28.0
type UnknownOptionError string
func (UnknownOptionError) Error ¶ added in v3.28.0
func (e UnknownOptionError) Error() string
type WatermarkOptions ¶
type WatermarkOptions struct { Enabled bool Opacity float64 Position GravityOptions Scale float64 }
func (WatermarkOptions) ShouldReplicate ¶ added in v3.24.0
func (wo WatermarkOptions) ShouldReplicate() bool
Click to show internal directories.
Click to hide internal directories.