Documentation
¶
Index ¶
- Constants
- type AdjustOptions
- type ChromaSubsampling
- type ColorProfile
- type ContrastOptions
- type CropOptions
- type DuotoneOptions
- type ExtendAspectRatioOptions
- type ExtendOptions
- type GradientOptions
- type GravityType
- type ImgwireImage
- type NegateOptions
- type NormalizeOptions
- type OutputFormat
- type PaddingOptions
- type ProgressiveValue
- type QualityValue
- type ResizingAlgorithm
- type ResizingType
- type RotateOptions
- type StandardUploadResponse
- type URLOptions
- type URLPreset
- type WatermarkOptions
- type WatermarkPositionOptions
- type WatermarkShadowOptions
- type WatermarkSizeOptions
- type ZoomOptions
Constants ¶
View Source
const ( ProgressiveAuto ProgressiveValue = "auto" QualityAuto QualityValue = "auto" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdjustOptions ¶ added in v0.3.0
type ChromaSubsampling ¶ added in v0.3.1
type ChromaSubsampling string
const ( ChromaSubsampling444 ChromaSubsampling = "4:4:4" ChromaSubsampling422 ChromaSubsampling = "4:2:2" ChromaSubsamplingAuto ChromaSubsampling = "auto" )
type ColorProfile ¶ added in v0.3.0
type ColorProfile string
const ( ColorProfileSRGB ColorProfile = "srgb" ColorProfileRGB16 ColorProfile = "rgb16" ColorProfileCMYK ColorProfile = "cmyk" ColorProfileKeep ColorProfile = "keep" ColorProfilePreserve ColorProfile = "preserve" )
type ContrastOptions ¶ added in v0.3.0
type CropOptions ¶ added in v0.3.0
type DuotoneOptions ¶ added in v0.3.0
type ExtendAspectRatioOptions ¶ added in v0.3.0
type ExtendOptions ¶ added in v0.3.0
type GradientOptions ¶ added in v0.3.0
type GravityType ¶
type GravityType string
const ( GravityNorth GravityType = "north" GravitySouth GravityType = "south" GravityEast GravityType = "east" GravityWest GravityType = "west" GravityNorthEast GravityType = "northeast" GravityNorthWest GravityType = "northwest" GravitySouthEast GravityType = "southeast" GravitySouthWest GravityType = "southwest" GravityCenter GravityType = "center" GravityAttention GravityType = "attention" GravityEntropy GravityType = "entropy" )
type ImgwireImage ¶
type ImgwireImage struct {
generated.ImageSchema
}
func ExtendImage ¶
func ExtendImage(image generated.ImageSchema) ImgwireImage
func ExtendImagePtr ¶
func ExtendImagePtr(image *generated.ImageSchema) *ImgwireImage
func (ImgwireImage) URL ¶
func (image ImgwireImage) URL(options URLOptions) (string, error)
type NegateOptions ¶ added in v0.3.0
type NegateOptions struct {
Alpha bool `json:"alpha"`
}
type NormalizeOptions ¶ added in v0.3.0
type OutputFormat ¶
type OutputFormat string
const ( FormatAuto OutputFormat = "auto" FormatJPG OutputFormat = "jpg" FormatJPEG OutputFormat = "jpeg" FormatPNG OutputFormat = "png" FormatAVIF OutputFormat = "avif" FormatGIF OutputFormat = "gif" FormatWEBP OutputFormat = "webp" FormatTIFF OutputFormat = "tiff" )
type PaddingOptions ¶ added in v0.3.0
type ProgressiveValue ¶ added in v0.3.1
type ProgressiveValue string
type QualityValue ¶ added in v0.3.1
type QualityValue string
type ResizingAlgorithm ¶ added in v0.3.0
type ResizingAlgorithm string
const ( ResizingAlgorithmNearest ResizingAlgorithm = "nearest" ResizingAlgorithmCubic ResizingAlgorithm = "cubic" ResizingAlgorithmMitchell ResizingAlgorithm = "mitchell" ResizingAlgorithmLanczos2 ResizingAlgorithm = "lanczos2" ResizingAlgorithmLanczos3 ResizingAlgorithm = "lanczos3" )
type ResizingType ¶
type ResizingType string
const ( ResizingCover ResizingType = "cover" ResizingContain ResizingType = "contain" ResizingFill ResizingType = "fill" ResizingInside ResizingType = "inside" ResizingOutside ResizingType = "outside" ResizingFit ResizingType = "fit" ResizingFillDown ResizingType = "fill-down" ResizingForce ResizingType = "force" ResizingAuto ResizingType = "auto" )
type RotateOptions ¶ added in v0.3.0
type StandardUploadResponse ¶
type StandardUploadResponse struct {
Image ImgwireImage
UploadURL string
AdditionalProperties map[string]interface{}
}
func ExtendStandardUploadResponse ¶
func ExtendStandardUploadResponse( response *generated.StandardUploadResponseSchema, ) *StandardUploadResponse
type URLOptions ¶
type URLOptions struct {
Preset *URLPreset
Adjust any
Background *string
BackgroundAlpha *float64
Blur any
Brightness *float64
ChromaSubsampling *ChromaSubsampling
ColorProfile *ColorProfile
Colorize *string
Contrast any
Crop any
DPI *int
DPR *float64
Duotone any
Enlarge *bool
Extend any
ExtendAspectRatio any
Flip any
Format *OutputFormat
Gradient any
Gravity any
Height *int
Hue *float64
KeepCopyright *bool
Lightness *float64
MinHeight *int
MinWidth *int
Monochrome any
Negate any
Normalize any
Padding any
Pixelate *float64
Progressive any
Quality any
ResizingAlgorithm *ResizingAlgorithm
ResizingType *ResizingType
Rotate any
Saturation *float64
Sharpen any
StripColorProfile *bool
StripMetadata *bool
Watermark any
WatermarkPosition any
WatermarkRotate any
WatermarkShadow any
WatermarkSize any
WatermarkText any
WatermarkURL *string
Width *int
Zoom any
}
type WatermarkOptions ¶ added in v0.3.0
type WatermarkPositionOptions ¶ added in v0.3.0
type WatermarkShadowOptions ¶ added in v0.3.0
type WatermarkSizeOptions ¶ added in v0.3.0
type ZoomOptions ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.